Skip to content

Commit

Permalink
Merge pull request #236 from clarin-eric/1.6.14-patch
Browse files Browse the repository at this point in the history
1.6.14 patch
  • Loading branch information
WillemElbers authored Dec 12, 2024
2 parents 7f540aa + 8802efd commit 64b0d57
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
32 changes: 16 additions & 16 deletions docker/vcr-local-dev/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
version: '3'
services:
webapp :
image: registry.gitlab.com/clarin-eric/docker-alpine-supervisor-java-tomcat-base:2.0.3
environment:
- "CATALINA_OPTS=-Djava.security.egd=file:/dev/urandom"
ports:
- 8080:8080
volumes:
- ../..:/app/src
- ./conf/vcr/vcr-admin.conf:/conf/vcr-admin.conf
- ./conf/vcr/pidproviders.properties:/conf/pidproviders.properties
- ./conf/tomcat/vcr-context.xml:/srv/tomcat8/conf/Catalina/localhost/ROOT.xml
- ./conf/tomcat/tomcat-users.xml:/srv/tomcat8/conf/tomcat-users.xml
- ./conf/fluentd/vcr.conf:/etc/fluentd/conf.d/vcr.conf
# - ./conf/server.jks:/cert/server.jks
networks:
- vcr
# webapp :
# image: registry.gitlab.com/clarin-eric/docker-alpine-supervisor-java-tomcat-base:2.0.3
# environment:
# - "CATALINA_OPTS=-Djava.security.egd=file:/dev/urandom"
# ports:
# - 8080:8080
# volumes:
# - ../..:/app/src
# - ./conf/vcr/vcr-admin.conf:/conf/vcr-admin.conf
# - ./conf/vcr/pidproviders.properties:/conf/pidproviders.properties
# - ./conf/tomcat/vcr-context.xml:/srv/tomcat8/conf/Catalina/localhost/ROOT.xml
# - ./conf/tomcat/tomcat-users.xml:/srv/tomcat8/conf/tomcat-users.xml
# - ./conf/fluentd/vcr.conf:/etc/fluentd/conf.d/vcr.conf
## - ./conf/server.jks:/cert/server.jks
# networks:
# - vcr

database:
image: "mariadb:10.3.10-bionic"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,19 +286,18 @@ public RecordList getRecords(String prefix, Date from, Date until,
if ((vcs != null) && !vcs.isEmpty()) {
List<Record> records = new ArrayList<Record>(vcs.size());
for (VirtualCollection vc : vcs) {
records.add(createRecord(vc, headerOnly));
/*
* XXX: force fetching of creators.
*/
vc.getCreators().size();

/*
* XXX: force fetching of resources in case of "cmdi"
* prefix.
* Force fetching of creators, keywords and resources which
* are defined with lazy loading. This avoids the
* org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role .... no Session
* exception.
*/
if ("cmdi".equals(prefix) && !headerOnly) {
vc.getResources().size();
}
vc.getCreators().size();
vc.getKeywords().size();
vc.getResources().size();

records.add(createRecord(vc, headerOnly));

}
boolean hasMore = (offset + vcs.size()) < count;
return new RecordList(records, offset, hasMore, (int) count);
Expand Down

0 comments on commit 64b0d57

Please sign in to comment.