From: Patric Plitzner
Date: Tue, 21 Oct 2014 10:42:04 +0000 (+0000)
Subject: merge-update from trunk
X-Git-Tag: 3.6.0~393^2~5
X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/69daa919c7022842410b6b84da09b63ddc1f6175?hp=b85b96a3fe6587341b32b869abf1ecf2d130f1d9
merge-update from trunk
---
diff --git a/.gitattributes b/.gitattributes
index bd49e6697..6b7c83216 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1002,65 +1002,6 @@ eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/print
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/SelectServiceWizardPage.java -text
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/SelectStylesheetWizardPage.java -text
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/SelectTaxaWizardPage.java -text
-eu.etaxonomy.taxeditor.remoting/.classpath -text
-eu.etaxonomy.taxeditor.remoting/.project -text
-eu.etaxonomy.taxeditor.remoting/.settings/org.eclipse.jdt.core.prefs -text
-eu.etaxonomy.taxeditor.remoting/.settings/org.eclipse.pde.core.prefs -text
-eu.etaxonomy.taxeditor.remoting/.svnignore -text
-eu.etaxonomy.taxeditor.remoting/META-INF/MANIFEST.MF -text
-eu.etaxonomy.taxeditor.remoting/build.properties -text
-eu.etaxonomy.taxeditor.remoting/lib/.svnignore -text
-eu.etaxonomy.taxeditor.remoting/pom.xml -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CachedCommonServiceImpl.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmEntityCacheManager.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmTransientEntityCacher.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/ICachedCommonService.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/LazyLoadingCachingUtils.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmPersistentRemoteSource.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSource.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceBase.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceException.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/ICdmRemoteSource.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/taxeditor/remoting/RemotingTestPluginActivator.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/java/org/hibernate/proxy/AbstractLazyInitializer.java -text
-eu.etaxonomy.taxeditor.remoting/src/main/resources/etc/jetty/.svnignore -text
-eu.etaxonomy.taxeditor.remoting/src/main/resources/etc/jetty/jetty-runner-9.2.3.v20140905.jar -text
-eu.etaxonomy.taxeditor.remoting/src/main/resources/etc/jetty/start-9.2.3.v20140905.jar -text
-eu.etaxonomy.taxeditor.remoting/src/main/resources/eu/etaxonomy/cdm/config.properties -text
-eu.etaxonomy.taxeditor.remoting/src/main/resources/eu/etaxonomy/cdm/httpInvokerServiceClients.xml -text
-eu.etaxonomy.taxeditor.remoting/src/main/resources/eu/etaxonomy/cdm/localApplicationContext.xml -text
-eu.etaxonomy.taxeditor.remoting/src/main/resources/eu/etaxonomy/cdm/remotingApplicationContext.xml -text
-eu.etaxonomy.taxeditor.remoting/src/main/resources/eu/etaxonomy/cdm/remoting_persistence_security.xml -text
-eu.etaxonomy.taxeditor.remoting/src/main/resources/eu/etaxonomy/cdm/remoting_services_security.xml -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/cdm/polytomouskey/PolytomousKeyTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/exception/CDMServerException.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/BaseRemotingTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CDMServer.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmPersistentRemoteSourceTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmRemoteSourceTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTestManager.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/HttpInvokerServicesTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/lazyloading/CdmServiceCacherTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemoteLazyLoadingTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemotePersistentCollectionTest.java -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/datasources.xml -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/eu/etaxonomy/cdm/cdm.datasources.xml -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/eu/etaxonomy/cdm/polytomouskey/PolytomousKeyTest.readPolytmousKeyData.xml -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/eu/etaxonomy/cdm/polytomouskey/PolytomousKeyTest.xml -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/eu/etaxonomy/cdm/testRemotingApplicationContext.xml -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.xml -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.xml -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/h2/cdmTest.h2.db -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/h2/cdmTest.trace.db -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/log4j.properties -text
-eu.etaxonomy.taxeditor.remoting/src/test/resources/unitils.properties -text
eu.etaxonomy.taxeditor.store/.classpath -text
eu.etaxonomy.taxeditor.store/.project -text
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF -text
diff --git a/.gitignore b/.gitignore
index 000adc05f..5c8b928b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,12 +31,6 @@ eu.etaxonomy.taxeditor.navigation/.settings
eu.etaxonomy.taxeditor.navigation/target
eu.etaxonomy.taxeditor.printpublisher/.settings
eu.etaxonomy.taxeditor.printpublisher/target
-eu.etaxonomy.taxeditor.remoting/*.log
-eu.etaxonomy.taxeditor.remoting/.settings
-eu.etaxonomy.taxeditor.remoting/lib
-eu.etaxonomy.taxeditor.remoting/lib/*.jar
-eu.etaxonomy.taxeditor.remoting/src/main/resources/etc/jetty/cdmlib-remote-webapp.war
-eu.etaxonomy.taxeditor.remoting/target
eu.etaxonomy.taxeditor.store/.settings
eu.etaxonomy.taxeditor.store/hibernate.log
eu.etaxonomy.taxeditor.store/target
diff --git a/eu.etaxonomy.taxeditor.remoting/.classpath b/eu.etaxonomy.taxeditor.remoting/.classpath
deleted file mode 100644
index 5ece8b2ef..000000000
--- a/eu.etaxonomy.taxeditor.remoting/.classpath
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eu.etaxonomy.taxeditor.remoting/.project b/eu.etaxonomy.taxeditor.remoting/.project
deleted file mode 100644
index a73967e19..000000000
--- a/eu.etaxonomy.taxeditor.remoting/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- eu.etaxonomy.taxeditor.remoting
- Holds all UI tests for the Taxonomic Editor. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
- org.eclipse.pde.PluginNature
-
-
diff --git a/eu.etaxonomy.taxeditor.remoting/.settings/org.eclipse.jdt.core.prefs b/eu.etaxonomy.taxeditor.remoting/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c537b6306..000000000
--- a/eu.etaxonomy.taxeditor.remoting/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/eu.etaxonomy.taxeditor.remoting/.settings/org.eclipse.pde.core.prefs b/eu.etaxonomy.taxeditor.remoting/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index f29e940a0..000000000
--- a/eu.etaxonomy.taxeditor.remoting/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/eu.etaxonomy.taxeditor.remoting/.svnignore b/eu.etaxonomy.taxeditor.remoting/.svnignore
deleted file mode 100644
index d9c99e99a..000000000
--- a/eu.etaxonomy.taxeditor.remoting/.svnignore
+++ /dev/null
@@ -1,4 +0,0 @@
-lib
-*.log
-target
-.settings
diff --git a/eu.etaxonomy.taxeditor.remoting/META-INF/MANIFEST.MF b/eu.etaxonomy.taxeditor.remoting/META-INF/MANIFEST.MF
deleted file mode 100644
index 2824f5434..000000000
--- a/eu.etaxonomy.taxeditor.remoting/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,69 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: UI Test Bundle
-Bundle-SymbolicName: eu.etaxonomy.taxeditor.remoting;singleton:=true
-Bundle-Version: 3.3.8.qualifier
-Bundle-Activator: eu.etaxonomy.taxeditor.remoting.RemotingTestPluginActivator
-Bundle-Vendor: EDIT
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Export-Package: eu.etaxonomy.cdm.api.application,
- eu.etaxonomy.cdm.remote,
- eu.etaxonomy.taxeditor.httpinvoker,
- org.hibernate.collection.internal,
- org.hibernate.proxy
-Bundle-ClassPath: lib/aspectjrt-1.7.1.jar,
- lib/c3p0-0.9.2.jar,
- lib/cdmlib-commons-3.3.8-SNAPSHOT.jar,
- lib/cdmlib-ext-3.3.8-SNAPSHOT.jar,
- lib/cdmlib-model-3.3.8-SNAPSHOT.jar,
- lib/cdmlib-services-3.3.8-SNAPSHOT.jar,
- lib/ehcache-core-2.4.3.jar,
- lib/hamcrest-core-1.3.jar,
- lib/jboss-logging-3.1.3.GA.jar,
- lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar,
- lib/jdom-1.1.3.jar,
- lib/junit-4.11.jar,
- lib/log4j-1.2.17.jar,
- lib/spring-security-config-3.1.3.RELEASE.jar,
- lib/spring-security-core-3.1.3.RELEASE.jar,
- lib/spring-security-remoting-3.1.3.RELEASE.jar,
- lib/unitils-core-3.4.2.jar,
- lib/commons-logging-1.1.1.jar,
- lib/commons-lang-2.6.jar,
- lib/aopalliance-1.0.jar,
- lib/joda-time-2.1.jar,
- lib/lsid-client-1.1.2.jar,
- lib/lucene-core-3.6.2.jar,
- lib/lsid-server-1.1.2.jar,
- lib/slf4j-api-1.7.2.jar,
- lib/javassist-3.17.1-GA.jar,
- lib/unitils-spring-3.4.2.jar,
- lib/unitils-database-3.4.2.jar,
- lib/commons-dbcp-1.4.jar,
- lib/commons-pool-1.5.4.jar,
- lib/unitils-dbmaintainer-3.4.2.jar,
- lib/h2-1.4.181.jar,
- lib/unitils-dbunit-3.4.2.jar,
- lib/hibernate-jpa-2.0-api-1.0.1.Final.jar,
- lib/hibernate-commons-annotations-4.0.1.Final.jar,
- lib/hibernate-core-4.1.10.Final.jar,
- lib/hibernate-entitymanager-4.1.10.Final.jar,
- lib/hibernate-envers-4.1.10.Final.jar,
- lib/hibernate-search-engine-4.2.0.Final.jar,
- lib/org.springframework.context-3.2.2.RELEASE.jar,
- lib/org.springframework.aop-3.2.2.RELEASE.jar,
- lib/org.springframework.aspects-3.2.2.RELEASE.jar,
- lib/org.springframework.beans-3.2.2.RELEASE.jar,
- lib/org.springframework.core-3.2.2.RELEASE.jar,
- lib/org.springframework.expression-3.2.2.RELEASE.jar,
- lib/org.springframework.jdbc-3.2.2.RELEASE.jar,
- lib/org.springframework.orm-3.2.2.RELEASE.jar,
- lib/org.springframework.transaction-3.2.2.RELEASE.jar,
- lib/org.springframework.web-3.2.2.RELEASE.jar,
- lib/cdmlib-persistence-3.3.8-SNAPSHOT.jar,
- lib/dbunit-2.4.9.jar,
- lib/opencsv-2.4.jar
-Import-Package: org.osgi.framework
-Require-Bundle: org.eclipse.osgi
-
diff --git a/eu.etaxonomy.taxeditor.remoting/build.properties b/eu.etaxonomy.taxeditor.remoting/build.properties
deleted file mode 100644
index 5eaf7be3f..000000000
--- a/eu.etaxonomy.taxeditor.remoting/build.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-output.. = target/classes/
-bin.includes = META-INF/,\
- lib/aspectjrt-1.7.1.jar,\
- lib/c3p0-0.9.2.jar,\
- lib/cdmlib-commons-3.3.8-SNAPSHOT.jar,\
- lib/cdmlib-ext-3.3.8-SNAPSHOT.jar,\
- lib/cdmlib-model-3.3.8-SNAPSHOT.jar,\
- lib/cdmlib-services-3.3.8-SNAPSHOT.jar,\
- lib/ehcache-core-2.4.3.jar,\
- lib/hamcrest-core-1.3.jar,\
- lib/jboss-logging-3.1.3.GA.jar,\
- lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar,\
- lib/jdom-1.1.3.jar,\
- lib/junit-4.11.jar,\
- lib/log4j-1.2.17.jar,\
- lib/spring-security-config-3.1.3.RELEASE.jar,\
- lib/spring-security-core-3.1.3.RELEASE.jar,\
- lib/spring-security-remoting-3.1.3.RELEASE.jar,\
- lib/unitils-core-3.4.2.jar,\
- lib/commons-logging-1.1.1.jar,\
- lib/commons-lang-2.6.jar,\
- lib/aopalliance-1.0.jar,\
- lib/joda-time-2.1.jar,\
- lib/lsid-client-1.1.2.jar,\
- lib/lucene-core-3.6.2.jar,\
- lib/lsid-server-1.1.2.jar,\
- lib/slf4j-api-1.7.2.jar,\
- lib/javassist-3.17.1-GA.jar,\
- src/main/resources/etc/jetty/cdmlib-remote-webapp.war,\
- lib/unitils-spring-3.4.2.jar,\
- lib/unitils-database-3.4.2.jar,\
- lib/commons-dbcp-1.4.jar,\
- lib/commons-pool-1.5.4.jar,\
- lib/unitils-dbmaintainer-3.4.2.jar,\
- lib/h2-1.4.181.jar,\
- lib/unitils-dbunit-3.4.2.jar,\
- lib/hibernate-jpa-2.0-api-1.0.1.Final.jar,\
- lib/hibernate-commons-annotations-4.0.1.Final.jar,\
- lib/hibernate-core-4.1.10.Final.jar,\
- lib/hibernate-entitymanager-4.1.10.Final.jar,\
- lib/hibernate-envers-4.1.10.Final.jar,\
- lib/hibernate-search-engine-4.2.0.Final.jar,\
- lib/org.springframework.context-3.2.2.RELEASE.jar,\
- lib/org.springframework.aop-3.2.2.RELEASE.jar,\
- lib/org.springframework.aspects-3.2.2.RELEASE.jar,\
- lib/org.springframework.beans-3.2.2.RELEASE.jar,\
- lib/org.springframework.core-3.2.2.RELEASE.jar,\
- lib/org.springframework.expression-3.2.2.RELEASE.jar,\
- lib/org.springframework.jdbc-3.2.2.RELEASE.jar,\
- lib/org.springframework.orm-3.2.2.RELEASE.jar,\
- lib/org.springframework.transaction-3.2.2.RELEASE.jar,\
- lib/org.springframework.web-3.2.2.RELEASE.jar,\
- src/main/resources/etc/jetty/jetty-runner-9.1.5.v20140505.jar,\
- lib/cdmlib-persistence-3.3.8-SNAPSHOT.jar,\
- lib/dbunit-2.4.9.jar,\
- lib/opencsv-2.4.jar,\
- src/test/resources/h2/,\
- src/test/resources/log4j.properties
-bin.excludes = src/test/
diff --git a/eu.etaxonomy.taxeditor.remoting/lib/.svnignore b/eu.etaxonomy.taxeditor.remoting/lib/.svnignore
deleted file mode 100644
index d392f0e82..000000000
--- a/eu.etaxonomy.taxeditor.remoting/lib/.svnignore
+++ /dev/null
@@ -1 +0,0 @@
-*.jar
diff --git a/eu.etaxonomy.taxeditor.remoting/pom.xml b/eu.etaxonomy.taxeditor.remoting/pom.xml
deleted file mode 100644
index 6df07fe26..000000000
--- a/eu.etaxonomy.taxeditor.remoting/pom.xml
+++ /dev/null
@@ -1,539 +0,0 @@
-
-
-
-
- eu.etaxonomy
- taxeditor-parent
- 3.3.8-SNAPSHOT
-
- 4.0.0
- eu.etaxonomy.taxeditor.remoting
- eclipse-plugin
- Remoting Bundle
- Remoting Plugin Taxonomic Editor
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 2.7
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.4
-
-
- copy-dependencies
- validate
-
- copy-dependencies
-
-
-
- cdmlib-remote-webapp
-
-
- cdmlib-services,cdmlib-commons,cdmlib-persistence,cdmlib-ext,cdmlib-model
-
- ${basedir}/lib
- true
- true
- true
-
-
-
- copy-dependency-war
- validate
-
- copy-dependencies
-
-
-
- cdmlib-remote-webapp
-
-
- ${basedir}/src/main/resources/etc/jetty
-
- true
- true
- true
-
-
-
-
-
- org.apache.maven.plugins
- maven-antrun-plugin
- 1.7
-
-
- update-snapshot-jar-names
- validate
-
- run
-
-
-
- Anonymizing war
-
-
-
-
-
-
-
-
- Update cdmlib jars to SNAPSHOT when build with
- timestamp
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- cleanCdmlibJars
-
-
-
- maven-clean-plugin
- 2.3
-
-
-
- ${basedir}/lib
-
- cdmlib-*
-
- false
-
-
-
-
-
-
-
-
- cleanAllJars
-
-
-
- maven-clean-plugin
- 2.3
-
-
-
- ${basedir}/lib
-
- *
-
- false
-
-
-
-
-
-
-
-
- copyAllJars
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.4
-
-
- copy-all-dependencies
- validate
-
- copy-dependencies
-
-
-
- cdmlib-remote-webapp
-
- ${basedir}/lib
- true
- true
- true
-
-
-
-
-
-
-
-
-
-
- SpringSource Enterprise Bundle Repository - External Bundle
- Milestones
- http://repository.springsource.com/maven/bundles/milestone
-
-
-
- SpringSource Enterprise Bundle Repository - SpringSource
- Bundle Releases
- http://repository.springsource.com/maven/bundles/release
-
-
-
- SpringSource Enterprise Bundle Repository - External Bundle
- Releases
- http://repository.springsource.com/maven/bundles/external
-
-
-
-
-
- eu.etaxonomy
- cdmlib-remote-webapp
- ${cdmlib.version}
- war
-
-
- eu.etaxonomy
- cdmlib-services
- ${cdmlib.version}
-
-
- eu.etaxonomy
- cdmlib-commons
- ${cdmlib.version}
-
-
- eu.etaxonomy
- cdmlib-persistence
- ${cdmlib.version}
-
-
- eu.etaxonomy
- cdmlib-ext
- ${cdmlib.version}
-
-
- eu.etaxonomy
- cdmlib-model
- ${cdmlib.version}
-
-
-
- org.unitils
- unitils-core
- 3.4.2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- net.sf.ehcache
- ehcache-core
- 2.4.3
-
-
- org.hibernate
- hibernate-core
- 4.1.10.Final
-
-
- org.hibernate.common
- hibernate-commons-annotations
- 4.0.1.Final
-
-
- org.hibernate
- hibernate-search-engine
- 4.2.0.Final
-
-
- org.hibernate.javax.persistence
- hibernate-jpa-2.0-api
- 1.0.1.Final
-
-
- org.hibernate
- hibernate-envers
- 4.1.10.Final
-
-
- org.hibernate
- hibernate-entitymanager
- 4.1.10.Final
-
-
- junit
- junit
- 4.11
- test
-
-
- log4j
- log4j
- 1.2.17
-
-
- org.jdom
- jdom
- 1.1.3
-
-
- org.springframework
- org.springframework.context
- 3.2.2.RELEASE
-
-
- org.springframework
- org.springframework.aspects
- 3.2.2.RELEASE
-
-
- org.springframework
- org.springframework.beans
- 3.2.2.RELEASE
-
-
- org.springframework
- org.springframework.transaction
- 3.2.2.RELEASE
-
-
- org.springframework
- org.springframework.web
- 3.2.2.RELEASE
-
-
- org.springframework
- org.springframework.core
- 3.2.2.RELEASE
-
-
- org.springframework
- org.springframework.aop
- 3.2.2.RELEASE
-
-
- org.springframework
- org.springframework.expression
- 3.2.2.RELEASE
-
-
- org.springframework
- org.springframework.orm
- 3.2.2.RELEASE
-
-
- org.springframework
- org.springframework.jdbc
- 3.2.2.RELEASE
-
-
- org.springframework.security
- spring-security-core
- 3.1.3.RELEASE
-
-
- org.springframework.security
- spring-security-config
- 3.1.3.RELEASE
-
-
- org.springframework.security
- spring-security-remoting
- 3.1.3.RELEASE
-
-
- org.jboss.logging
- jboss-logging
- 3.1.3.GA
-
-
- org.hamcrest
- hamcrest-core
- 1.3
-
-
- com.mchange
- c3p0
- 0.9.2
-
-
- org.jboss.spec.javax.transaction
- jboss-transaction-api_1.1_spec
- 1.0.0.Final
-
-
- org.aspectj
- aspectjrt
- 1.7.1
-
-
- commons-logging
- commons-logging
- 1.1.1
-
-
- commons-lang
- commons-lang
- 2.6
-
-
- aopalliance
- aopalliance
- 1.0
-
-
- joda-time
- joda-time
- 2.1
-
-
- com.ibm.lsid
- lsid-client
- 1.1.2
-
-
- com.ibm.lsid
- lsid-server
- 1.1.2
-
-
- org.apache.lucene
- lucene-core
- 3.6.2
-
-
- org.slf4j
- slf4j-api
- 1.7.2
-
-
- org.javassist
- javassist
- 3.17.1-GA
-
-
- au.com.bytecode
- opencsv
- 2.4
-
-
-
-
-
- org.unitils
- unitils-spring
- 3.4.2
-
-
- org.unitils
- unitils-database
- 3.4.2
-
-
- commons-dbcp
- commons-dbcp
- 1.4
-
-
- commons-pool
- commons-pool
- 1.5.4
-
-
- org.unitils
- unitils-dbmaintainer
- 3.4.2
-
-
- com.h2database
- h2
- 1.4.181
-
-
- org.unitils
- unitils-dbunit
- 3.4.2
-
-
- org.dbunit
- dbunit
- 2.4.9
-
-
-
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java
deleted file mode 100644
index b664cbe69..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.cdm.api.application;
-
-import javax.sql.DataSource;
-
-import org.apache.log4j.Logger;
-import org.hibernate.SessionFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.TransactionStatus;
-
-import eu.etaxonomy.cdm.api.cache.ICachedCommonService;
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
-import eu.etaxonomy.cdm.api.service.ICommonService;
-import eu.etaxonomy.cdm.ext.geo.IEditGeoService;
-
-
-/**
- * CDM Application Configuration class which manages the configuration for remoting
- * clients
- *
- */
-@Component
-public class CdmApplicationRemoteConfiguration extends CdmApplicationDefaultConfiguration {
-
- @SuppressWarnings("unused")
- private static final Logger logger = Logger.getLogger(CdmApplicationRemoteConfiguration.class);
-
- @Autowired
- IEditGeoService editGeoService;
-
- @Autowired
- private ICachedCommonService cachedCommonService;
-
- public CdmApplicationRemoteConfiguration() {
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#getTransactionManager()
- */
- @Override
- public PlatformTransactionManager getTransactionManager() throws UnsupportedOperationException {
- throw new UnsupportedOperationException("getTransactionManager is not implemented for CdmApplicationRemoteConfiguration");
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#startTransaction()
- */
- @Override
- public TransactionStatus startTransaction() throws UnsupportedOperationException {
- throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#startTransaction()
- */
- @Override
- public TransactionStatus startTransaction(Boolean readOnly) throws UnsupportedOperationException {
- throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#commitTransaction(org.springframework.transaction.TransactionStatus)
- */
- @Override
- public void commitTransaction(TransactionStatus txStatus) throws UnsupportedOperationException {
- throw new UnsupportedOperationException("commitTransaction is not implemented for CdmApplicationRemoteConfiguration");
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#NewConversation()
- */
- @Override
- public ConversationHolder NewConversation() {
- return new ConversationHolderMock();
- }
-
- /**
- * @return
- */
- public IEditGeoService getEditGeoService() {
- return this.editGeoService;
- }
-
- /**
- * @return
- */
- public ICachedCommonService getCachedCommonService(){
- return this.cachedCommonService;
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setDataSource(javax.sql.DataSource)
- */
- @Override
- public void setDataSource(DataSource dataSource) {
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setTransactionManager(org.springframework.transaction.PlatformTransactionManager)
- */
- @Override
- public void setTransactionManager(PlatformTransactionManager transactionManager) {
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setSessionFactory(org.hibernate.SessionFactory)
- */
- @Override
- public void setSessionFactory(SessionFactory sessionFactory) {
- }
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java
deleted file mode 100644
index 6cb5b1c04..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-
-package eu.etaxonomy.cdm.api.application;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.apache.log4j.Logger;
-import org.hibernate.collection.internal.AbstractPersistentCollection;
-import org.hibernate.proxy.AbstractLazyInitializer;
-import org.springframework.beans.MutablePropertyValues;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-
-import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
-import eu.etaxonomy.cdm.common.monitor.NullProgressMonitor;
-import eu.etaxonomy.cdm.common.monitor.SubProgressMonitor;
-import eu.etaxonomy.cdm.remote.ICdmRemoteSource;
-
-/**
- * CDM Application Controller class for remoting clients
- *
- * FIXME:Remoting extending {@link CdmApplicationController} is a temporary workaround.
- * The {@link CdmApplicationController} should be split into a CdmApplicationControllerBase
- * class with {@link CdmApplicationController} and this class as subclasses
- *
- */
-public class CdmApplicationRemoteController extends CdmApplicationController {
-
- private static final Logger logger = Logger.getLogger(CdmApplicationRemoteController.class);
-
- public static final Resource DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE =
- new ClassPathResource("/eu/etaxonomy/cdm/remotingApplicationContext.xml");
- private final Resource applicationContextResource;
- private final IProgressMonitor progressMonitor;
-
- /**
- * Creates new instance of CdmApplicationRemoteController
- *
- * @param applicationContextResource
- * @param remoteSource
- * @param omitTermLoading
- * @param progressMonitor
- * @param listeners
- * @return
- */
- public static CdmApplicationRemoteController NewInstance(Resource applicationContextResource,
- ICdmRemoteSource remoteSource,
- boolean omitTermLoading,
- IProgressMonitor progressMonitor,
- List listeners) {
- return new CdmApplicationRemoteController(applicationContextResource,
- remoteSource,
- omitTermLoading,
- progressMonitor,
- listeners);
-
- }
- /**
- * Creates new instance of CdmApplicationRemoteController
- *
- * @param applicationContextResource
- * @param remoteSource
- * @param omitTermLoading
- * @param progressMonitor
- * @param listeners
- * @return
- */
- public static CdmApplicationRemoteController NewInstance(ICdmRemoteSource remoteSource,
- boolean omitTermLoading,
- IProgressMonitor progressMonitor,
- List listeners) {
-
- return new CdmApplicationRemoteController(DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE,
- remoteSource,
- omitTermLoading,
- progressMonitor,
- listeners);
-
- }
-
- /**
- * Constructs CdmApplicationRemoteController
- *
- * @param applicationContextResource
- * @param remoteSource
- * @param omitTermLoading
- * @param progressMonitor
- * @param listeners
- */
- private CdmApplicationRemoteController(Resource applicationContextResource,
- ICdmRemoteSource remoteSource,
- boolean omitTermLoading,
- IProgressMonitor progressMonitor,
- List listeners){
- logger.info("Start CdmApplicationRemoteController with remote source: " + remoteSource.getName());
- this.applicationContextResource =
- applicationContextResource != null ? applicationContextResource : DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE;
- this.progressMonitor = progressMonitor != null ? progressMonitor : new NullProgressMonitor();
-
- setNewRemoteSource(remoteSource, omitTermLoading, listeners);
-
- }
-
-
-
-
- /**
- * Creates and starts a new spring application context
- *
- * @param remoteSource object for connecting to an http-invoker server
- * @param omitTermLoading
- * @param listeners
- * @return
- */
- protected boolean setNewRemoteSource(ICdmRemoteSource remoteSource,
- boolean omitTermLoading,
- List listeners){
-
- logger.info("Connecting to '" + remoteSource.getName() + "'");
-
- MonitoredGenericApplicationContext applicationContext = new MonitoredGenericApplicationContext();
- int refreshTasks = 45;
- int nTasks = 5 + refreshTasks;
-
- progressMonitor.beginTask("Connecting to '" + remoteSource.getName() + "'", nTasks);
-
- progressMonitor.subTask("Registering remote source.");
- PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer();
- Properties properties = new Properties();
- properties.setProperty("remoteServer", remoteSource.getServer());
- properties.setProperty("remotePort", String.valueOf(remoteSource.getPort()));
- properties.setProperty("remoteContext", remoteSource.getContextPath());
- pspc.setProperties(properties);
- applicationContext.addBeanFactoryPostProcessor(pspc);
- applicationContext.getEnvironment().setActiveProfiles("remoting");
- progressMonitor.worked(1);
-
- XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(applicationContext);
- //xmlReader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_NONE);
- progressMonitor.subTask("Registering resources.");
- xmlReader.loadBeanDefinitions(applicationContextResource);
- progressMonitor.worked(1);
-
- //omitTerms
- if (omitTermLoading == true){
- String initializerName = "persistentTermInitializer";
- BeanDefinition beanDef = applicationContext.getBeanDefinition(initializerName);
- MutablePropertyValues values = beanDef.getPropertyValues();
- values.addPropertyValue("omit", omitTermLoading);
- }
-
- if (listeners != null){
- for(ApplicationListener listener : listeners){
- applicationContext.addApplicationListener(listener);
- }
- }
-
-
- applicationContext.refresh(new SubProgressMonitor(progressMonitor, refreshTasks));
- applicationContext.start();
-
- progressMonitor.subTask("Cleaning up.");
- setApplicationContext(applicationContext);
- progressMonitor.worked(1);
-
- progressMonitor.done();
- return true;
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.application.CdmApplicationController#init()
- */
- @Override
- protected void init(){
- configuration = (ICdmApplicationConfiguration)applicationContext.getBean("cdmApplicationRemoteConfiguration");
- AbstractLazyInitializer.setConfiguration((CdmApplicationRemoteConfiguration)configuration);
- AbstractPersistentCollection.setConfiguration((CdmApplicationRemoteConfiguration)configuration);
-
- }
-
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CachedCommonServiceImpl.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CachedCommonServiceImpl.java
deleted file mode 100644
index 519025d45..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CachedCommonServiceImpl.java
+++ /dev/null
@@ -1,198 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.api.cache;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import org.hibernate.collection.internal.PersistentList;
-import org.hibernate.collection.internal.PersistentMap;
-import org.hibernate.collection.internal.PersistentSet;
-import org.hibernate.collection.internal.PersistentSortedMap;
-import org.hibernate.collection.internal.PersistentSortedSet;
-import org.hibernate.collection.spi.PersistentCollection;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import eu.etaxonomy.cdm.api.cache.LazyLoadingCachingUtils.CollectionType;
-import eu.etaxonomy.cdm.api.service.ICommonService;
-import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.common.PersistentMultiLanguageText;
-
-/**
- * @author cmathew
- * @date 14 Oct 2014
- *
- */
-@Component
-public class CachedCommonServiceImpl implements ICachedCommonService {
-
-
- @Autowired
- private ICommonService commonService;
-
- private static boolean cacheEnabled = true;
-
- @Autowired
- private CdmEntityCacheManager cdmEntityCacheManager;
-
- @Autowired
- private LazyLoadingCachingUtils lazyLoadingCachingUtils;
-
-
- public static boolean isCacheEnabled() {
- return cacheEnabled;
- }
-
- public static void setCacheEnabled(boolean cacheEnabled) {
- CachedCommonServiceImpl.cacheEnabled = cacheEnabled;
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#find(java.lang.Class, int)
- */
- @Override
- public CdmBase find(Class extends CdmBase> clazz, int id){
- if(cacheEnabled) {
- CdmBase cdmEntity = cdmEntityCacheManager.getCdmTransientEntityCacher().getFromCache(clazz, id);
- if(cdmEntity != null) {
- return cdmEntity;
- } else {
- cdmEntity = commonService.find(clazz, id);
- cdmEntity = cdmEntityCacheManager.getCdmTransientEntityCacher().put(clazz, id, cdmEntity);
- return cdmEntity;
- }
- } else {
- return commonService.find(clazz, id);
- }
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#initializeCollection(org.hibernate.collection.spi.PersistentCollection)
- */
- @Override
- public PersistentCollection initializeCollection(PersistentCollection col) {
- PersistentCollection pc = commonService.initializeCollection(col);
-
- return pc;
- }
-
- @Override
- public void updatePersistentCollection(CollectionField colf) {
- switch(colf.getType()) {
- case MAP:
- lazyLoadingCachingUtils.updatePersistentCollection((Map)colf.getCollection());
- case SET:
- case LIST:
- default:
- }
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#isEmpty(org.hibernate.collection.spi.PersistentCollection)
- */
- @Override
- public boolean isEmpty(PersistentCollection col) {
- return commonService.isEmpty(col);
-
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#size(org.hibernate.collection.spi.PersistentCollection)
- */
- @Override
- public int size(PersistentCollection col) {
- return commonService.size(col);
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#get(org.hibernate.collection.spi.PersistentCollection, int)
- */
- @Override
- public Object get(PersistentCollection col, int index) {
- return commonService.get(col, index);
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#contains(org.hibernate.collection.spi.PersistentCollection, java.lang.Object)
- */
- @Override
- public boolean contains(PersistentCollection col, Object element) {
- return commonService.contains(col, element);
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#containsKey(org.hibernate.collection.spi.PersistentCollection, java.lang.Object)
- */
- @Override
- public boolean containsKey(PersistentCollection col, Object key) {
- return commonService.containsKey(col, key);
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.remoting.service.ICachedCommonService#containsValue(org.hibernate.collection.spi.PersistentCollection, java.lang.Object)
- */
- @Override
- public boolean containsValue(PersistentCollection col, Object element) {
- return commonService.containsValue(col, element);
- }
-
- @Override
- public CollectionField getCollectionField(PersistentCollection pc) {
- if(pc != null) {
- if(pc instanceof PersistentSet) {
- return new CollectionField(new HashSet((Set)pc), CollectionType.SET);
- }
- if(pc instanceof PersistentSortedSet) {
- return new CollectionField(new TreeSet((Set)pc), CollectionType.SET);
- }
- if(pc instanceof PersistentList) {
- return new CollectionField(new ArrayList((List)pc), CollectionType.LIST);
- }
- if(pc instanceof PersistentMap || pc instanceof PersistentMultiLanguageText) {
- return new CollectionField(new HashMap((Map)pc), CollectionType.MAP);
- }
- if(pc instanceof PersistentSortedMap) {
- return new CollectionField(new TreeMap((Map)pc), CollectionType.MAP);
- }
- }
- return null;
- }
-
- public class CollectionField {
- private final Object col;
- private final CollectionType type;
- public CollectionField(Object col, CollectionType type) {
- this.col = col;
- this.type = type;
- }
-
- public Object getCollection() {
- return this.col;
- }
-
- public CollectionType getType() {
- return this.type;
- }
- }
-
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmEntityCacheManager.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmEntityCacheManager.java
deleted file mode 100644
index 46d08880a..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmEntityCacheManager.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.api.cache;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-/**
- * @author cmathew
- * @date 16 Oct 2014
- *
- */
-@Component
-public class CdmEntityCacheManager {
-
- @Autowired
- private CdmTransientEntityCacher cdmTransientEntityCacher;
-
-
- public CdmTransientEntityCacher getCdmTransientEntityCacher() {
- return cdmTransientEntityCacher;
- }
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java
deleted file mode 100644
index ab1c3041f..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package eu.etaxonomy.cdm.api.cache;
-
-import java.util.UUID;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import eu.etaxonomy.cdm.api.cache.CdmCacher;
-import eu.etaxonomy.cdm.api.service.ITermService;
-import eu.etaxonomy.cdm.model.common.CdmBase;
-
-/**
- * Class which uses CDM services to cache cdm entities
- *
- * FIXME: Currently only handles terms entities. It would be
- * interesting to have a generic method which finds the
- * correct service to load / cache the entity.
- *
- * @author cmathew
- *
- * @param
- */
-
-public class CdmServiceCacher extends CdmCacher {
-
- @Autowired
- ITermService termService;
-
- @Override
- protected T findByUuid(UUID uuid) {
- T term = (T)termService.findWithoutFlush(uuid);
- return term;
- }
-
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmTransientEntityCacher.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmTransientEntityCacher.java
deleted file mode 100644
index c53c2e9e0..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/CdmTransientEntityCacher.java
+++ /dev/null
@@ -1,179 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.api.cache;
-
-import java.util.UUID;
-
-import org.springframework.stereotype.Component;
-
-import net.sf.ehcache.Cache;
-import net.sf.ehcache.Element;
-import net.sf.ehcache.config.CacheConfiguration;
-import net.sf.ehcache.store.MemoryStoreEvictionPolicy;
-import eu.etaxonomy.cdm.model.common.CdmBase;
-
-/**
- * @author cmathew
- * @date 14 Oct 2014
- *
- */
-@Component
-public class CdmTransientEntityCacher extends CdmServiceCacher {
-
- private static final String ENTITY_CACHE_NAME = "entityCache";
-
- public CdmTransientEntityCacher() {
- // Create entity cache
- getDefaultCacheManager().addCache(new Cache(getEntityCacheConfiguration()));
- }
- /**
- * Returns the default cache configuration.
- *
- * @return
- */
- private CacheConfiguration getEntityCacheConfiguration() {
- // For a better understanding on how to size caches, refer to
- // http://ehcache.org/documentation/configuration/cache-size
- return new CacheConfiguration(ENTITY_CACHE_NAME, 500)
- .memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy.LFU)
- .eternal(false)
- // default ttl and tti set to 2 hours
- .timeToLiveSeconds(60*60*2)
- .timeToIdleSeconds(60*60*2);
- // This is 2.6.9 API
- //.maxEntriesLocalDisk(1000);
- //.persistence(new PersistenceConfiguration().strategy(Strategy.LOCALTEMPSWAP));
- }
-
- /**
- * Returns the cache corresponding to the cache id
- *
- * @param cacheId
- * @return
- */
- private static Cache getCache() {
- return getDefaultCacheManager().getCache(ENTITY_CACHE_NAME);
- }
-
-
- /**
- * Puts the (Key,Value) pair of ({@link java.util.UUID}, {@link eu.etaxonomy.cdm.model.common.CdmBase}),
- * in the cache corresponding to the given cache id
- *
- * @param cacheId
- * @param uuid
- * @param cdmEntity
- */
- public T put(String id, T cdmEntity) {
- T cachedCdmEntity = getFromCache(cdmEntity.getUuid());
- cachedCdmEntity = (cachedCdmEntity == null) ? getFromCache(id) : cachedCdmEntity;
- if(cachedCdmEntity != null) {
- return cachedCdmEntity;
- } else {
- getCache().put(new Element(id, cdmEntity));
- return cdmEntity;
- }
- }
-
- @Override
- public T put(UUID uuid, T cdmEntity) {
- T cachedCdmEntity = getFromCache(cdmEntity.getUuid());
- cachedCdmEntity = (cachedCdmEntity == null) ? getFromCache(uuid) : cachedCdmEntity;
- if(cachedCdmEntity != null) {
- return cachedCdmEntity;
- } else {
- getCache().put(new Element(uuid, cdmEntity));
- return cdmEntity;
- }
- }
-
- public T put(Class extends CdmBase> clazz, int id, T cdmEntity) {
- String cacheId = generateId(clazz,id);
- return put(cacheId, cdmEntity);
- }
-
- /**
- * Gets the cache element corresponding to the given {@link java.util.UUID}
- * in the cache corresponding to the given cache id.
- *
- * @param uuid
- * @return
- */
- @Override
- protected Element getCacheElement(UUID uuid) {
- return getCache().get(uuid);
- }
-
- private Element getCacheElement(String id) {
- return getCache().get(id);
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.model.ICdmCacher#getFromCache(java.util.UUID)
- */
- @Override
- public T getFromCache(UUID uuid) {
- Element e = getCacheElement(uuid);
- e = (getCacheElement(uuid) == null) ? super.getCacheElement(uuid) : e;
- if (e == null) {
- return null;
- } else {
- return(T)e.getObjectValue();
- }
- }
-
- public T getFromCache(String id) {
- Element e = getCacheElement(id);
- if (e == null) {
- return null;
- } else {
- return (T) e.getObjectValue();
- }
- }
-
-
- public T getFromCache(Class extends CdmBase> clazz, int id) {
- String cacheId = generateId(clazz,id);
- return getFromCache(cacheId);
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.model.ICdmCacher#exists(java.util.UUID)
- */
- @Override
- public boolean exists(UUID uuid) {
- return (getCacheElement(uuid) != null || super.getCacheElement(uuid) != null);
- }
-
- public boolean exists(String id) {
- return (getCacheElement(id) != null);
- }
-
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.model.ICdmCacher#existsAndIsNotNull(java.util.UUID)
- */
- @Override
- public boolean existsAndIsNotNull(UUID uuid) {
- return getFromCache(uuid) != null;
- }
-
- public boolean existsAndIsNotNull(String id) {
- return getFromCache(id) != null;
- }
-
-
- private static String generateId(Class extends CdmBase> clazz, int id) {
- return clazz.getName() + String.valueOf(id);
- }
-
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/ICachedCommonService.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/ICachedCommonService.java
deleted file mode 100644
index 10d02bfaa..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/ICachedCommonService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-/**
- * Copyright (C) 2014 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-package eu.etaxonomy.cdm.api.cache;
-
-import org.hibernate.collection.internal.PersistentMap;
-import org.hibernate.collection.spi.PersistentCollection;
-
-import eu.etaxonomy.cdm.api.cache.CachedCommonServiceImpl.CollectionField;
-import eu.etaxonomy.cdm.model.common.CdmBase;
-
-/**
- * @author cmathew
- * @date 14 Oct 2014
- *
- */
-public interface ICachedCommonService {
-
- public CdmBase find(Class extends CdmBase> clazz, int id);
-
- public PersistentCollection initializeCollection(PersistentCollection col);
-
- public void updatePersistentCollection(CollectionField colf);
-
- public boolean isEmpty(PersistentCollection col);
-
- public int size(PersistentCollection col);
-
- public Object get(PersistentCollection col, int index);
-
- public boolean contains(PersistentCollection col, Object element);
-
- public boolean containsKey(PersistentCollection col, Object key);
-
- public boolean containsValue(PersistentCollection col, Object element);
-
- public CollectionField getCollectionField(PersistentCollection pc);
-
-}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/LazyLoadingCachingUtils.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/LazyLoadingCachingUtils.java
deleted file mode 100644
index 64d00990c..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/api/cache/LazyLoadingCachingUtils.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.api.cache;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.hibernate.collection.internal.PersistentMap;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import eu.etaxonomy.cdm.model.common.CdmBase;
-
-/**
- * @author cmathew
- * @date 15 Oct 2014
- *
- */
-@Component
-public class LazyLoadingCachingUtils {
-
- @Autowired
- private CdmEntityCacheManager cdmEntityCacheManager;
-
- public static enum CollectionType {
- SET,
- LIST,
- MAP;
-
- @Override
- public String toString() {
- return this.name().toLowerCase();
- }
- }
-
- public void updatePersistentCollection(Map map) {
- if(map == null || map.isEmpty()) {
- return;
- }
-
- int originalMapSize = map.size();
- Object[] result = new Object[ map.size() * 2 ];
- Iterator iter = map.entrySet().iterator();
- int i=0;
- while ( iter.hasNext() ) {
- Map.Entry e = (Map.Entry) iter.next();
- result[i++] = e.getKey();
- result[i++] = e.getValue();
- }
-
- for(i=0; i cdmSourceAttributes;
-
- /**
- * Creates a new instance of CdmPersistentRemoteSource
- *
- * @param name
- * @param server
- * @param port
- * @param contextPath
- * @param nomenclaturalCode
- * @return
- * @throws CdmRemoteSourceException
- */
- public static CdmPersistentRemoteSource NewInstance(String remoteSource) throws CdmRemoteSourceException {
- if(exists(remoteSource)) {
- return new CdmPersistentRemoteSource(remoteSource);
- } else {
- throw new CdmRemoteSourceException("Remote source '" + remoteSource + "' does not exist in sources setting file");
- }
-
- }
-
- /**S
- * Creates a new CdmPersistentRemoteSource
- *
- * @param name
- * @param server
- * @param port
- * @param contextPath
- * @param nomenclaturalCode
- * @throws CdmRemoteSourceException
- */
- private CdmPersistentRemoteSource(String remoteSource) throws CdmRemoteSourceException {
-
- CdmPersistentXMLSource cdmPersistentXMLSource = CdmPersistentXMLSource.NewInstance(remoteSource, REMOTESOURCE_BEAN_POSTFIX);
- if(cdmPersistentXMLSource.getElement() != null) {
- beanName = cdmPersistentXMLSource.getBeanName();
- // properties from the persistent xml file
- cdmSourceProperties = cdmPersistentXMLSource.getCdmSourceProperties();
- cdmSourceAttributes = cdmPersistentXMLSource.getCdmSourceAttributes();
- checkProperties(cdmSourceProperties);
- } else {
- throw new CdmRemoteSourceException("Remote source '" + remoteSource + "' does not exist in settings file");
- }
- initDatabaseConnection();
- }
-
- private static void checkProperties(Properties cdmSourceProperties) throws CdmRemoteSourceException {
- if(!cdmSourceProperties.containsKey(CdmSourceProperties.SERVER.toString())) {
- throw new CdmRemoteSourceException("Could not initialise remote source. Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing");
- }
- String port = (String)cdmSourceProperties.get(CdmSourceProperties.PORT.toString());
- if(port == null || port.isEmpty()) {
- throw new CdmRemoteSourceException("Could not initialise remote source. Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing");
- }
- if(!cdmSourceProperties.containsKey(CdmSourceProperties.CONTEXTPATH.toString())) {
- throw new CdmRemoteSourceException("Could not initialise remote source. Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing");
- }
- // default NomenclaturalCode is always ICNAFP
- if(!cdmSourceProperties.containsKey(CdmSourceProperties.NOMENCLATURAL_CODE.toString())) {
- cdmSourceProperties.put(CdmSourceProperties.NOMENCLATURAL_CODE.toString(), NomenclaturalCode.ICNAFP.name());
- }
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.config.ICdmPersistentSource#getBeanName()
- */
- @Override
- public String getBeanName() {
- return beanName;
- }
-
- @Override
- public String getServer() {
- return cdmSourceProperties.getProperty(CdmSourceProperties.SERVER.toString());
- }
-
- @Override
- public int getPort() {
- String port = CdmUtils.Nz(cdmSourceProperties.getProperty(CdmSourceProperties.PORT.toString()));
- if (port == null || "".equals(port)){
- return -1;
- }else{
- //TODO exception if non integer
- return Integer.valueOf(port);
- }
- }
-
- @Override
- public String getContextPath() {
- return cdmSourceProperties.getProperty(CdmSourceProperties.CONTEXTPATH.toString());
- }
-
- @Override
- public NomenclaturalCode getNomenclaturalCode() {
- return NomenclaturalCode.fromString(cdmSourceProperties.getProperty(CdmSourceProperties.NOMENCLATURAL_CODE.toString()));
- }
-
- public static CdmPersistentRemoteSource save(String strRemoteSourceName, ICdmRemoteSource remoteSource) throws CdmRemoteSourceException {
- Properties cdmSourceProperties = new Properties();
- cdmSourceProperties.put(CdmSourceProperties.SERVER.toString(), remoteSource.getServer());
- cdmSourceProperties.put(CdmSourceProperties.PORT.toString(), String.valueOf(remoteSource.getPort()));
- cdmSourceProperties.put(CdmSourceProperties.CONTEXTPATH.toString(), remoteSource.getContextPath());
- cdmSourceProperties.put(CdmSourceProperties.NOMENCLATURAL_CODE.toString(), remoteSource.getNomenclaturalCode().name());
- checkProperties(cdmSourceProperties);
- return save(strRemoteSourceName, cdmSourceProperties);
- }
-
- private static CdmPersistentRemoteSource save(String strRemoteSourceName,Properties cdmSourceProperties) throws CdmRemoteSourceException {
-
- //root
- Element root = getBeansRoot(CdmPersistentSourceUtils.getCdmSourceInputStream());
- if (root == null){
- return null;
- }
- //bean
- Element bean = XmlHelp.getFirstAttributedChild(root, "bean", "id", CdmPersistentSourceUtils.getBeanName(strRemoteSourceName, REMOTESOURCE_BEAN_POSTFIX));
- if (bean != null){
- bean.detach(); //delete old version if necessary
- }
- bean = insertXmlBean(root, CdmPersistentSourceUtils.getBeanName(strRemoteSourceName, REMOTESOURCE_BEAN_POSTFIX), CdmPersistentRemoteSource.class.getName());
-
-
- Properties props = cdmSourceProperties;
- Enumeration e = props.propertyNames();
-
- while (e.hasMoreElements()) {
- String key = (String) e.nextElement();
- insertXmlValueProperty(bean, key, props.getProperty(key));
- }
-
- //save
- saveToXml(root.getDocument(),
- CdmPersistentSourceUtils.getResourceDirectory(),
- CdmPersistentXMLSource.CDMSOURCE_FILE_NAME,
- XmlHelp.prettyFormat );
-
- return NewInstance(strRemoteSourceName) ;
-
- }
-
- /**
- * @param strDataSourceName
- * @param dataSource
- * @param code
- * @return
- * the updated dataSource, null if not succesful
- */
- public static CdmPersistentRemoteSource update(String strRemoteSourceName,
- ICdmRemoteSource remoteSource) throws CdmRemoteSourceException {
- CdmPersistentSourceUtils.delete(CdmPersistentSourceUtils.getBeanName(strRemoteSourceName,REMOTESOURCE_BEAN_POSTFIX));
- return save(strRemoteSourceName, remoteSource);
- }
-
- /**
- * Tests existing of the datsource in the according config file.
- * @return true if a datasource with the given name exists in the according datasource config file.
- */
- public static boolean exists(String strRemoteSourceName){
- Element bean = CdmPersistentSourceUtils.getCdmSourceBeanXml(strRemoteSourceName, REMOTESOURCE_BEAN_POSTFIX);
- return (bean != null);
- }
-
- /**
- * Returns a list of all datasources stored in the datasource config file
- * @return all existing data sources
- * @throws CdmRemoteSourceException
- */
- @SuppressWarnings("unchecked")
- static public List getAllRemoteSources() throws CdmRemoteSourceException{
- List remoteSources = new ArrayList();
-
- Element root = getBeansRoot(CdmPersistentSourceUtils.getCdmSourceInputStream());
- if (root == null){
- return null;
- }else{
- List lsChildren = root.getChildren("bean", root.getNamespace());
-
- for (Element elBean : lsChildren){
- String strId = elBean.getAttributeValue("id");
- if (strId != null && strId.endsWith(REMOTESOURCE_BEAN_POSTFIX)){
- strId = strId.replace(REMOTESOURCE_BEAN_POSTFIX, "");
- remoteSources.add(new CdmPersistentRemoteSource(strId));
- }
- }
- }
- return remoteSources;
- }
-
- @Override
- public String toString(){
- if (getName() != null){
- return getName();
- }else{
- return null;
- }
- }
-
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSource.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSource.java
deleted file mode 100644
index 9dbb34b3a..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSource.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.remote;
-
-import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-
-/**
- * Class representing a CDM remote source
- *
- */
-public class CdmRemoteSource extends CdmRemoteSourceBase {
-
- /**
- * Creates a new instance of CdmRemoteSource
- *
- * @param name
- * @param server
- * @param port
- * @param contextPath
- * @param nomenclaturalCode
- * @return
- */
- public static CdmRemoteSource NewInstance() {
- return new CdmRemoteSource(DEFAULT_NAME, DEFAULT_SERVER, DEFAULT_PORT, DEFAULT_CONTEXT_PATH, DEFAULT_NOMENCLATURAL_CODE);
- }
-
- /**
- * Creates a new instance of CdmRemoteSource
- *
- * @param name
- * @param server
- * @param port
- * @param contextPath
- * @param nomenclaturalCode
- * @return
- */
- public static CdmRemoteSource NewInstance(String name, String server, int port, String contextPath, NomenclaturalCode nomenclaturalCode) {
- return new CdmRemoteSource(name, server, port, contextPath, nomenclaturalCode);
- }
-
- /**
- * Creates a new CdmRemoteSource
- *
- * @param name
- * @param server
- * @param port
- * @param contextPath
- * @param nomenclaturalCode
- */
- private CdmRemoteSource(String name, String server, int port, String contextPath, NomenclaturalCode nomenclaturalCode) {
- super(name, server, port, contextPath, nomenclaturalCode);
-
- }
-
-
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceBase.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceBase.java
deleted file mode 100644
index 9fbb8d44d..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceBase.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.remote;
-
-import java.util.Map;
-
-import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean;
-
-import eu.etaxonomy.cdm.api.service.IDatabaseService;
-import eu.etaxonomy.cdm.config.CdmSource;
-import eu.etaxonomy.cdm.config.CdmSourceException;
-import eu.etaxonomy.cdm.model.metadata.CdmMetaData.MetaDataPropertyName;
-import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-
-/**
- * Base class representing a CDM remote source.
- * This class handles all the configuration relating to the remoting aspect of
- * a CDM source.
- *
- */
-public class CdmRemoteSourceBase extends CdmSource implements ICdmRemoteSource {
-
- protected static final String DEFAULT_NAME = "default";
- protected static final String DEFAULT_SERVER = "127.0.0.1";
- protected static final int DEFAULT_PORT = 8080;
- protected static final String DEFAULT_CONTEXT_PATH = "";
- protected static final NomenclaturalCode DEFAULT_NOMENCLATURAL_CODE = NomenclaturalCode.ICNAFP;
- private String contextPath;
- private String baseUrl;
-
- private IDatabaseService databaseService;
-
- /**
- * Constructs a CdmRemoteSourceBase object with default values.
- *
- */
- protected CdmRemoteSourceBase() {
- setName(DEFAULT_NAME);
- setServer(DEFAULT_SERVER);
- setPort(DEFAULT_PORT);
- setContextPath(DEFAULT_CONTEXT_PATH);
- setNomenclaturalCode(DEFAULT_NOMENCLATURAL_CODE);
- }
-
- /**
- * Constructs a CdmRemoteSourceBase
- *
- * @param name
- * @param server
- * @param port
- * @param contextPath
- * @param nomenclaturalCode
- */
- public CdmRemoteSourceBase(String name, String server, int port, String contextPath, NomenclaturalCode nomenclaturalCode) {
- setName(name);
- setServer(server);
- setPort(port);
- setContextPath(contextPath);
- setNomenclaturalCode(nomenclaturalCode);
- initDatabaseConnection();
- }
-
- protected void initDatabaseConnection() {
- if(getContextPath() == null || getContextPath().equals("")) {
- setBaseUrl("http://" + getServer() + ":" + String.valueOf(getPort()));
- } else {
- setBaseUrl("http://" + getServer() + ":" + String.valueOf(getPort()) + "/" + getContextPath());
- }
- // the database service needs to be initialised (before the spring
- // application context initialsation) since it is required to
- // to make queries related to the source database
- HttpInvokerProxyFactoryBean proxy = new HttpInvokerProxyFactoryBean();
- proxy.setServiceInterface(IDatabaseService.class);
- proxy.setServiceUrl(baseUrl + "/remoting/database.service");
- proxy.afterPropertiesSet();
- databaseService = (IDatabaseService) proxy.getObject();
-
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.remote.ICdmRemoteSource#getBaseUrl()
- */
- @Override
- public String getBaseUrl() {
- return baseUrl;
- }
-
- /**
- * Sets the base url for the http-invoker services as listed in
- * httpInvokerServicesClients.xml.
- * e.g. for 'http://127.0.0.1:8080/col/remoting/common.service', the
- * base url would be 'http://127.0.0.1:8080/col'
- *
- * @param baseUrl
- */
- public void setBaseUrl(String baseUrl) {
- this.baseUrl = baseUrl;
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.remote.ICdmRemoteSource#getContextPath()
- */
- @Override
- public String getContextPath() {
- return contextPath;
- }
-
- /**
- * Sets the context path.
- * e.g. for 'http://127.0.0.1:8080/col/remoting/common.service', the
- * context path would be 'col'
- *
- * @param contextPath
- */
- public void setContextPath(String contextPath) {
- this.contextPath = contextPath;
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.config.CdmSource#getDbSchemaVersion()
- */
- @Override
- public String getDbSchemaVersion() throws CdmSourceException {
- return databaseService.getDbSchemaVersion();
-
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.config.CdmSource#isDbEmpty()
- */
- @Override
- public boolean isDbEmpty() throws CdmSourceException {
- return databaseService.isDbEmpty();
-
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.config.CdmSource#checkConnection()
- */
- @Override
- public boolean checkConnection() throws CdmSourceException {
- // assuming that database service works implies
- // the connection is up
- // if no exception is thrown then we assume that the
- // connection is up
- // FIXME:Remoting is this really correct?
- databaseService.getDbSchemaVersion();
-
- return true;
- }
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.config.CdmSource#getConnectionMessage()
- */
- @Override
- public String getConnectionMessage() {
- return "Conncting to Remote CDM Server " + getName();
- }
-
-
- @Override
- public Map getMetaDataMap() throws CdmSourceException {
- return databaseService.getCdmMetadataMap();
- }
-
-
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceException.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceException.java
deleted file mode 100644
index 3c2d7150e..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceException.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- *
- */
-package eu.etaxonomy.cdm.remote;
-
-/**
- *
- *
- */
-public class CdmRemoteSourceException extends Exception {
-
- public CdmRemoteSourceException(String message) {
- super(message);
- }
-
- public CdmRemoteSourceException(Exception e) {
- super(e);
- }
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/ICdmRemoteSource.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/ICdmRemoteSource.java
deleted file mode 100644
index f278c7468..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/cdm/remote/ICdmRemoteSource.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.remote;
-
-import eu.etaxonomy.cdm.config.ICdmSource;
-
-/**
- * Interface representing a CDM remote source
- *
- */
-public interface ICdmRemoteSource extends ICdmSource {
-
- /**
- * Gets the context path.
- * e.g. for 'http://127.0.0.1:8080/col/remoting/common.service', the
- * context path would be 'col'
- */
- public String getContextPath();
-
- /**
- * Gets the base url for the http-invoker services as listed in
- * httpInvokerServicesClients.xml.
- * e.g. for 'http://127.0.0.1:8080/col/remoting/common.service', the
- * base url would be 'http://127.0.0.1:8080/col'
- */
- public String getBaseUrl();
-
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/taxeditor/remoting/RemotingTestPluginActivator.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/taxeditor/remoting/RemotingTestPluginActivator.java
deleted file mode 100644
index 65db6ba48..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/eu/etaxonomy/taxeditor/remoting/RemotingTestPluginActivator.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package eu.etaxonomy.taxeditor.remoting;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class RemotingTestPluginActivator implements BundleActivator {
-
- private static BundleContext context;
-
- static BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- RemotingTestPluginActivator.context = bundleContext;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext bundleContext) throws Exception {
- RemotingTestPluginActivator.context = null;
- }
-
-}
diff --git a/eu.etaxonomy.taxeditor.remoting/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java b/eu.etaxonomy.taxeditor.remoting/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java
deleted file mode 100644
index 733857189..000000000
--- a/eu.etaxonomy.taxeditor.remoting/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java
+++ /dev/null
@@ -1,1338 +0,0 @@
-
-
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008-2011, Red Hat Inc. or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Inc.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.collection.internal;
-
-import java.io.Serializable;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import javax.naming.NamingException;
-
-import org.hibernate.AssertionFailure;
-import org.hibernate.HibernateException;
-import org.hibernate.LazyInitializationException;
-import org.hibernate.Session;
-import org.hibernate.collection.spi.PersistentCollection;
-import org.hibernate.engine.internal.ForeignKeys;
-import org.hibernate.engine.spi.CollectionEntry;
-import org.hibernate.engine.spi.EntityEntry;
-import org.hibernate.engine.spi.SessionFactoryImplementor;
-import org.hibernate.engine.spi.SessionImplementor;
-import org.hibernate.engine.spi.Status;
-import org.hibernate.engine.spi.TypedValue;
-import org.hibernate.internal.SessionFactoryRegistry;
-import org.hibernate.internal.util.MarkerObject;
-import org.hibernate.internal.util.collections.EmptyIterator;
-import org.hibernate.internal.util.collections.IdentitySet;
-import org.hibernate.persister.collection.CollectionPersister;
-import org.hibernate.persister.entity.EntityPersister;
-import org.hibernate.pretty.MessageHelper;
-import org.hibernate.type.Type;
-import org.jboss.logging.Logger;
-
-import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration;
-import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
-import eu.etaxonomy.cdm.api.cache.ICachedCommonService;
-import eu.etaxonomy.cdm.api.cache.CachedCommonServiceImpl.CollectionField;
-import eu.etaxonomy.cdm.api.service.ICommonService;
-import eu.etaxonomy.cdm.model.common.PersistentMultiLanguageText;
-
-/**
- * Base class implementing {@link org.hibernate.collection.spi.PersistentCollection}
- *
- * @author Gavin King
- */
-public abstract class AbstractPersistentCollection implements Serializable, PersistentCollection {
- private static final Logger log = Logger.getLogger( AbstractPersistentCollection.class );
-
- private static final long serialVersionUID = -7238232378593030571L;
-
- private transient SessionImplementor session;
- private boolean initialized;
- private transient List operationQueue;
- private transient boolean directlyAccessible;
- private transient boolean initializing;
- private Object owner;
- private int cachedSize = -1;
-
- private String role;
- private Serializable key;
- // collections detect changes made via their public interface and mark
- // themselves as dirty as a performance optimization
- private boolean dirty;
- private Serializable storedSnapshot;
-
- private String sessionFactoryUuid;
- private boolean specjLazyLoad = false;
-
- @Override
- public final String getRole() {
- return role;
- }
-
- @Override
- public final Serializable getKey() {
- return key;
- }
-
- @Override
- public final boolean isUnreferenced() {
- return role == null;
- }
-
- @Override
- public final boolean isDirty() {
- return dirty;
- }
-
- @Override
- public final void clearDirty() {
- dirty = false;
- }
-
- @Override
- public final void dirty() {
- dirty = true;
- }
-
- @Override
- public final Serializable getStoredSnapshot() {
- return storedSnapshot;
- }
-
- //Careful: these methods do not initialize the collection.
-
- /**
- * Is the initialized collection empty?
- */
- @Override
- public abstract boolean empty();
-
- /**
- * Called by any read-only method of the collection interface
- */
- protected final void read() {
- initialize( false );
- }
-
- /**
- * Called by the {@link Collection#size} method
- */
- @SuppressWarnings({"JavaDoc"})
- protected boolean readSize() {
- if ( !initialized ) {
- if ( cachedSize != -1 && !hasQueuedOperations() ) {
- return true;
- }
- else {
- // In remoting we are sure that session is null
- // both when using property paths and switching off conversations
- if(session == null && remoting) {
- log.info("--> readSize, of " + getRole() + " with key " + getKey());
- read();
- } else {
- boolean isExtraLazy = withTemporarySessionIfNeeded(
- new LazyInitializationWork() {
- @Override
- public Boolean doWork() {
- CollectionEntry entry = session.getPersistenceContext().getCollectionEntry( AbstractPersistentCollection.this );
-
- if ( entry != null ) {
- CollectionPersister persister = entry.getLoadedPersister();
- if ( persister.isExtraLazy() ) {
- if ( hasQueuedOperations() ) {
- session.flush();
- }
- cachedSize = persister.getSize( entry.getLoadedKey(), session );
- return true;
- }
- else {
- read();
- }
- }
- else{
- throwLazyInitializationExceptionIfNotConnected();
- }
- return false;
- }
- }
- );
- if ( isExtraLazy ) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- public static interface LazyInitializationWork {
- public T doWork();
- }
-
- private T withTemporarySessionIfNeeded(LazyInitializationWork lazyInitializationWork) {
- SessionImplementor originalSession = null;
- boolean isTempSession = false;
- boolean isJTA = false;
-
- if ( session == null ) {
- if ( specjLazyLoad ) {
- session = openTemporarySessionForLoading();
- isTempSession = true;
- }
- else {
- throwLazyInitializationException( "could not initialize proxy - no Session" );
- }
- }
- else if ( !session.isOpen() ) {
- if ( specjLazyLoad ) {
- originalSession = session;
- session = openTemporarySessionForLoading();
- isTempSession = true;
- }
- else {
- throwLazyInitializationException( "could not initialize proxy - the owning Session was closed" );
- }
- }
- else if ( !session.isConnected() ) {
- if ( specjLazyLoad ) {
- originalSession = session;
- session = openTemporarySessionForLoading();
- isTempSession = true;
- }
- else {
- throwLazyInitializationException( "could not initialize proxy - the owning Session is disconnected" );
- }
- }
-
- if ( isTempSession ) {
- // TODO: On the next major release, add an
- // 'isJTA' or 'getTransactionFactory' method to Session.
- isJTA = session.getTransactionCoordinator()
- .getTransactionContext().getTransactionEnvironment()
- .getTransactionFactory()
- .compatibleWithJtaSynchronization();
-
- if ( !isJTA ) {
- // Explicitly handle the transactions only if we're not in
- // a JTA environment. A lazy loading temporary session can
- // be created even if a current session and transaction are
- // open (ex: session.clear() was used). We must prevent
- // multiple transactions.
- ( ( Session) session ).beginTransaction();
- }
-
- session.getPersistenceContext().addUninitializedDetachedCollection(
- session.getFactory().getCollectionPersister( getRole() ),
- this
- );
- }
-
- try {
- return lazyInitializationWork.doWork();
- }
- finally {
- if ( isTempSession ) {
- // make sure the just opened temp session gets closed!
- try {
- if ( !isJTA ) {
- ( ( Session) session ).getTransaction().commit();
- }
- ( (Session) session ).close();
- }
- catch (Exception e) {
- log.warn( "Unable to close temporary session used to load lazy collection associated to no session" );
- }
- session = originalSession;
- }
- }
- }
-
- private SessionImplementor openTemporarySessionForLoading() {
- if ( sessionFactoryUuid == null ) {
- throwLazyInitializationException( "SessionFactory UUID not known to create temporary Session for loading" );
- }
-
- SessionFactoryImplementor sf = (SessionFactoryImplementor)
- SessionFactoryRegistry.INSTANCE.getSessionFactory( sessionFactoryUuid );
- return (SessionImplementor) sf.openSession();
- }
-
- protected Boolean readIndexExistence(final Object index) {
- if ( !initialized ) {
- // In remoting we are sure that session is null
- // both when using property paths and switching off conversations
- if(session == null && remoting) {
- log.info("--> readIndexExistence, of " + getRole() + " with key " + getKey());
- read();
- } else {
- Boolean extraLazyExistenceCheck = withTemporarySessionIfNeeded(
- new LazyInitializationWork() {
- @Override
- public Boolean doWork() {
- CollectionEntry entry = session.getPersistenceContext().getCollectionEntry( AbstractPersistentCollection.this );
- CollectionPersister persister = entry.getLoadedPersister();
- if ( persister.isExtraLazy() ) {
- if ( hasQueuedOperations() ) {
- session.flush();
- }
- return persister.indexExists( entry.getLoadedKey(), index, session );
- }
- else {
- read();
- }
- return null;
- }
- }
- );
- if ( extraLazyExistenceCheck != null ) {
- return extraLazyExistenceCheck;
- }
- }
- }
- return null;
- }
-
- protected Boolean readElementExistence(final Object element) {
- if ( !initialized ) {
- // In remoting we are sure that session is null
- // both when using property paths and switching off conversations
- if(session == null && remoting) {
- log.info("--> readElementExistence, of " + getRole() + " with key " + getKey());
- read();
-
- } else {
- Boolean extraLazyExistenceCheck = withTemporarySessionIfNeeded(
- new LazyInitializationWork() {
- @Override
- public Boolean doWork() {
- CollectionEntry entry = session.getPersistenceContext().getCollectionEntry( AbstractPersistentCollection.this );
- CollectionPersister persister = entry.getLoadedPersister();
- if ( persister.isExtraLazy() ) {
- if ( hasQueuedOperations() ) {
- session.flush();
- }
- return persister.elementExists( entry.getLoadedKey(), element, session );
- }
- else {
- read();
- }
- return null;
- }
- }
- );
- if ( extraLazyExistenceCheck != null ) {
- return extraLazyExistenceCheck;
- }
- }
- }
- return null;
- }
-
- protected static final Object UNKNOWN = new MarkerObject( "UNKNOWN" );
-
- protected Object readElementByIndex(final Object index) {
- if ( !initialized ) {
- // In remoting we are sure that session is null
- // both when using property paths and switching off conversations
- if(session == null && remoting) {
- log.info("--> readElementByIndex, of " + getRole() + " with key " + getKey());
- read();
-
- } else {
- class ExtraLazyElementByIndexReader implements LazyInitializationWork {
- private boolean isExtraLazy;
- private Object element;
-
- @Override
- public Object doWork() {
- CollectionEntry entry = session.getPersistenceContext().getCollectionEntry( AbstractPersistentCollection.this );
- CollectionPersister persister = entry.getLoadedPersister();
- isExtraLazy = persister.isExtraLazy();
- if ( isExtraLazy ) {
- if ( hasQueuedOperations() ) {
- session.flush();
- }
- element = persister.getElementByIndex( entry.getLoadedKey(), index, session, owner );
- }
- else {
- read();
- }
- return null;
- }
- }
-
- ExtraLazyElementByIndexReader reader = new ExtraLazyElementByIndexReader();
- //noinspection unchecked
- withTemporarySessionIfNeeded( reader );
- if ( reader.isExtraLazy ) {
- return reader.element;
- }
- }
- }
- return UNKNOWN;
-
- }
-
- protected int getCachedSize() {
- return cachedSize;
- }
-
- private boolean isConnectedToSession() {
- return session != null &&
- session.isOpen() &&
- session.getPersistenceContext().containsCollection( this );
- }
-
- /**
- * Called by any writer method of the collection interface
- */
- protected final void write() {
- initialize( true );
- dirty();
- }
-
- /**
- * Is this collection in a state that would allow us to
- * "queue" operations?
- */
- @SuppressWarnings({"JavaDoc"})
- protected boolean isOperationQueueEnabled() {
- return !initialized &&
- isConnectedToSession() &&
- isInverseCollection();
- }
-
- /**
- * Is this collection in a state that would allow us to
- * "queue" puts? This is a special case, because of orphan
- * delete.
- */
- @SuppressWarnings({"JavaDoc"})
- protected boolean isPutQueueEnabled() {
- return !initialized &&
- isConnectedToSession() &&
- isInverseOneToManyOrNoOrphanDelete();
- }
-
- /**
- * Is this collection in a state that would allow us to
- * "queue" clear? This is a special case, because of orphan
- * delete.
- */
- @SuppressWarnings({"JavaDoc"})
- protected boolean isClearQueueEnabled() {
- return !initialized &&
- isConnectedToSession() &&
- isInverseCollectionNoOrphanDelete();
- }
-
- /**
- * Is this the "inverse" end of a bidirectional association?
- */
- @SuppressWarnings({"JavaDoc"})
- private boolean isInverseCollection() {
- CollectionEntry ce = session.getPersistenceContext().getCollectionEntry( this );
- return ce != null && ce.getLoadedPersister().isInverse();
- }
-
- /**
- * Is this the "inverse" end of a bidirectional association with
- * no orphan delete enabled?
- */
- @SuppressWarnings({"JavaDoc"})
- private boolean isInverseCollectionNoOrphanDelete() {
- CollectionEntry ce = session.getPersistenceContext().getCollectionEntry( this );
- return ce != null &&
- ce.getLoadedPersister().isInverse() &&
- !ce.getLoadedPersister().hasOrphanDelete();
- }
-
- /**
- * Is this the "inverse" end of a bidirectional one-to-many, or
- * of a collection with no orphan delete?
- */
- @SuppressWarnings({"JavaDoc"})
- private boolean isInverseOneToManyOrNoOrphanDelete() {
- CollectionEntry ce = session.getPersistenceContext().getCollectionEntry( this );
- return ce != null && ce.getLoadedPersister().isInverse() && (
- ce.getLoadedPersister().isOneToMany() ||
- !ce.getLoadedPersister().hasOrphanDelete()
- );
- }
-
- /**
- * Queue an addition
- */
- @SuppressWarnings({"JavaDoc"})
- protected final void queueOperation(DelayedOperation operation) {
- if ( operationQueue == null ) {
- operationQueue = new ArrayList( 10 );
- }
- operationQueue.add( operation );
- dirty = true; //needed so that we remove this collection from the second-level cache
- }
-
- /**
- * After reading all existing elements from the database,
- * add the queued elements to the underlying collection.
- */
- protected final void performQueuedOperations() {
- for ( DelayedOperation operation : operationQueue ) {
- operation.operate();
- }
- }
-
- /**
- * After flushing, re-init snapshot state.
- */
- @Override
- public void setSnapshot(Serializable key, String role, Serializable snapshot) {
- this.key = key;
- this.role = role;
- this.storedSnapshot = snapshot;
- }
-
- /**
- * After flushing, clear any "queued" additions, since the
- * database state is now synchronized with the memory state.
- */
- @Override
- public void postAction() {
- operationQueue = null;
- cachedSize = -1;
- clearDirty();
- }
-
- /**
- * Not called by Hibernate, but used by non-JDK serialization,
- * eg. SOAP libraries.
- */
- public AbstractPersistentCollection() {
- }
-
- protected AbstractPersistentCollection(SessionImplementor session) {
- this.session = session;
- }
-
- /**
- * return the user-visible collection (or array) instance
- */
- @Override
- public Object getValue() {
- return this;
- }
-
- /**
- * Called just before reading any rows from the JDBC result set
- */
- @Override
- public void beginRead() {
- // override on some subclasses
- initializing = true;
- }
-
- /**
- * Called after reading all rows from the JDBC result set
- */
- @Override
- public boolean endRead() {
- //override on some subclasses
- return afterInitialize();
- }
-
- @Override
- public boolean afterInitialize() {
- setInitialized();
- //do this bit after setting initialized to true or it will recurse
- if ( operationQueue != null ) {
- performQueuedOperations();
- operationQueue = null;
- cachedSize = -1;
- return false;
- }
- else {
- return true;
- }
- }
-
- /**
- * Initialize the collection, if possible, wrapping any exceptions
- * in a runtime exception
- *
- * @param writing currently obsolete
- *
- * @throws LazyInitializationException if we cannot initialize
- */
- protected final void initialize(final boolean writing) {
- // In remoting we are sure that session is null
- // both when using property paths and switching off conversations
- if(session == null && remoting) {
- remoteInitialize();
- }
-
- if ( initialized ) {
- return;
- }
-
-
- withTemporarySessionIfNeeded(
- new LazyInitializationWork