geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r688604 - in /geronimo/server/trunk/plugins/openejb: geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ geronimo-openejb-clustering-wadi/src/test/java/org/apache/geronimo/openejb/cluster/s...
Date Mon, 25 Aug 2008 02:45:13 GMT
Author: dain
Date: Sun Aug 24 19:45:13 2008
New Revision: 688604

URL: http://svn.apache.org/viewvc?rev=688604&view=rev
Log:
Updated to latest OpenEJB APIs

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulContainer.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulInstanceManager.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/test/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulInstanceManagerTest.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulContainer.java?rev=688604&r1=688603&r2=688604&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulContainer.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulContainer.java
Sun Aug 24 19:45:13 2008
@@ -60,21 +60,19 @@
         int timeOut,
         int poolSize,
         int bulkPassivate) throws OpenEJBException {
-        super(id, transactionManager, securityService, passivator, timeOut, poolSize, bulkPassivate);
+        super(id, securityService, passivator, timeOut, poolSize, bulkPassivate);
         
         deploymentIdToManager = new HashMap<Object, Manager>();
         deploymentIdToNetworkConnectorTracker = new HashMap<Object, NetworkConnectorTracker>();
     }
 
     @Override
-    protected ClusteredStatefulInstanceManager newStatefulInstanceManager(TransactionManager
transactionManager,
-        SecurityService securityService,
+    protected ClusteredStatefulInstanceManager newStatefulInstanceManager(SecurityService
securityService,
         Class passivator,
         int timeOut,
         int poolSize,
         int bulkPassivate) throws OpenEJBException {
-        return new ClusteredStatefulInstanceManager(transactionManager,
-            securityService,
+        return new ClusteredStatefulInstanceManager(securityService,
             entityManagerRegistry,
             passivator,
             timeOut,

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulInstanceManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulInstanceManager.java?rev=688604&r1=688603&r2=688604&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulInstanceManager.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulInstanceManager.java
Sun Aug 24 19:45:13 2008
@@ -24,8 +24,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.transaction.TransactionManager;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.geronimo.clustering.Session;
@@ -34,7 +32,6 @@
 import org.apache.geronimo.clustering.SessionManager;
 import org.apache.geronimo.openejb.cluster.infra.SessionManagerTracker;
 import org.apache.openejb.OpenEJBException;
-import org.apache.openejb.SystemException;
 import org.apache.openejb.core.CoreDeploymentInfo;
 import org.apache.openejb.core.ThreadContext;
 import org.apache.openejb.core.stateful.BeanEntry;
@@ -52,15 +49,13 @@
     private final Map<Object, SessionManager> sessionManagersById;
     private final Map<Object, CoreDeploymentInfo> deploymentsById;
 
-    public ClusteredStatefulInstanceManager(TransactionManager transactionManager,
-        SecurityService securityService,
+    public ClusteredStatefulInstanceManager(SecurityService securityService,
         JtaEntityManagerRegistry jtaEntityManagerRegistry,
         Class passivatorClass,
         int timeout,
         int poolSize,
         int bulkPassivate) throws OpenEJBException {
-        super(transactionManager,
-            securityService,
+        super(securityService,
             jtaEntityManagerRegistry,
             passivatorClass,
             timeout,
@@ -192,11 +187,7 @@
             context.set(SessionOperation.class, SessionOperation.OUTBOUND_MIGRATION);
 
             passivate(context, beanEntry);
-            try {
-                freeInstance(context);
-            } catch (SystemException e) {
-                log.warn("Cannot free bean entry", e);
-            }
+            freeInstance(context);
         }
 
         public void notifySessionDestruction(org.apache.geronimo.clustering.Session session)
{
@@ -206,12 +197,8 @@
                 return;
             }
             context.set(SessionOperation.class, SessionOperation.DESTRUCTION);
-            
-            try {
-                freeInstance(context);
-            } catch (SystemException e) {
-                log.warn("Cannot free bean entry", e);
-            }
+
+            freeInstance(context);
         }
 
         protected ThreadContext newThreadContext(ClusteredBeanEntry beanEntry) {

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/test/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulInstanceManagerTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/test/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulInstanceManagerTest.java?rev=688604&r1=688603&r2=688604&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/test/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulInstanceManagerTest.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/test/java/org/apache/geronimo/openejb/cluster/stateful/container/ClusteredStatefulInstanceManagerTest.java
Sun Aug 24 19:45:13 2008
@@ -64,7 +64,7 @@
         JtaEntityManagerRegistry jtaEntityManagerRegistry = new JtaEntityManagerRegistry(txSynchRegistry);
         
         manager = (ClusteredStatefulInstanceManager) intercept(ClusteredStatefulInstanceManager.class,
-            new Object[] { txManager, securityService, jtaEntityManagerRegistry, null, 1,
1, 1 });
+            new Object[] { securityService, jtaEntityManagerRegistry, null, 1, 1, 1 });
         
         deploymentId = "deploymentId";
         deploymentInfo = new CoreDeploymentInfo(new DeploymentContext(deploymentId, null,
null),
@@ -98,7 +98,9 @@
     
     @Override
     protected void tearDown() throws Exception {
-        ThreadContext.exit(threadContext);
+        if (threadContext != null) {
+            ThreadContext.exit(threadContext);
+        }
     }
     
     public void testNewBeanEntryForUnknownDeploymentThrowsISE() throws Exception {

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java?rev=688604&r1=688603&r2=688604&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
Sun Aug 24 19:45:13 2008
@@ -249,10 +249,6 @@
         return deploymentInfo.isBeanManagedTransaction();
     }
 
-    public byte getTransactionAttribute(Method method) {
-        return deploymentInfo.getTransactionAttribute(method);
-    }
-
     public String getObjectName() {
         return objectName;
     }



Mime
View raw message