remotingApplicationContext : removed load time weaving config remoting-1.0 root/branches/taxeditor/remoting-1.0
authorCherian Mathew <c.mathew@bgbm.org>
Wed, 12 Feb 2014 11:04:35 +0000 (11:04 +0000)
committerCherian Mathew <c.mathew@bgbm.org>
Wed, 12 Feb 2014 11:04:35 +0000 (11:04 +0000)
AbstractPersistentCollection : reverting to original code
CdmApplicationRemoteController : adding missing method call

eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/api/application/CdmApplicationRemoteController.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remotingApplicationContext.xml

index 029e764d05650ba49bd513dd1f0635617f07815a..766a24b441ccf14aec065195ad69188cd7a7b28b 100644 (file)
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry kind="src" path="src/main/java"/>
        <classpathentry kind="src" path="src/test/java"/>
        <classpathentry kind="src" path="src/main/resources"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>
index 020bcf1144fb738ac3767904e7e69d3890071939..0e71ca72fa3a702520f1af9f9978d890cff9eb75 100644 (file)
@@ -289,15 +289,7 @@ public class CdmApplicationRemoteController  implements ICdmApplicationRemoteCon
        public final IWorkingSetService getWorkingSetService(){\r
                return configuration.getWorkingSetService();\r
        }\r
-       \r
-//     public final Object getBean(String name){\r
-//             return this.applicationContext.getBean(name);\r
-//     }\r
 \r
-       @Override\r
-       public IDatabaseService getDatabaseService() {\r
-               return configuration.getDatabaseService();\r
-       }\r
 \r
        @Override\r
        public ProviderManager getAuthenticationManager() {\r
index 7be989b265744eeebbdf4e4e55da847d29260dbb..adbbd466f536a1520f0a72e92624ffa85afda23e 100644 (file)
@@ -1,3 +1,5 @@
+
+
 /*
  * Hibernate, Relational Persistence for Idiomatic Java
  *
@@ -62,9 +64,10 @@ import org.jboss.logging.Logger;
  * @author Gavin King
  */
 public abstract class AbstractPersistentCollection implements Serializable, PersistentCollection {
-       private static final long serialVersionUID = -7238232378593030571L;
        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<DelayedOperation> operationQueue;
@@ -135,37 +138,35 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
                                return true;
                        }
                        else {
-//                             boolean isExtraLazy = withTemporarySessionIfNeeded(
-//                                             new LazyInitializationWork<Boolean>() {
-//                                                     @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;
-                                                               read();
-                                                               return true;
-//                                                     }
-//                                             }
-//                             );
-//                             if ( isExtraLazy ) {
-//                                     return true;
-//                             }
+                               boolean isExtraLazy = withTemporarySessionIfNeeded(
+                                               new LazyInitializationWork<Boolean>() {
+                                                       @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;
index e9c3af1e9b0c51269d1894f72a9e083046f75131..9e3d1ec65ca784c82629338102e546b865d0c1e0 100644 (file)
@@ -6,22 +6,14 @@
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
     http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">\r
-\r
-       <context:spring-configured />\r
+       \r
+       <!-- Remoting Aspect -->\r
+       <!--context:spring-configured />\r
     <bean id="cdmlazyLoader" class="eu.etaxonomy.cdm.api.lazyloading.CdmLazyLoader"\r
-      factory-method="aspectOf" />\r
-       <!-- <import resource="classpath:/eu/etaxonomy/cdm/services.xml"/> -->\r
-       <!--import resource="classpath:/eu/etaxonomy/cdm/defaultSecurityContext.xml"/> -->\r
+      factory-method="aspectOf" /--> \r
+\r
         <import resource="classpath:/eu/etaxonomy/cdm/remoting_services_security.xml"/> \r
-       <!-- <import resource="classpath:/eu/etaxonomy/cdm/spelling.xml"/> -->\r
 \r
-       <!-- includes service beans e.g. in eu/etaxonomy/cdm/api -->\r
-       <!-- Services are defined in httpInvokerServiceClients.xml, component-scan is not needed. -->\r
- <!-- \r
-       <context:component-scan base-package="eu/etaxonomy/cdm/api/service">\r
-       </context:component-scan>\r
- -->\r
-    \r
        <import resource="classpath:/eu/etaxonomy/cdm/httpInvokerServiceClients.xml"/>\r
  \r
        <context:component-scan base-package="eu/etaxonomy/cdm/api/application">\r