geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r830443 - in /geronimo/server/branches/2.2/plugins/openejb: geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ geronimo-openejb/src/main/java/org/apache/geronimo/openejb/
Date Wed, 28 Oct 2009 04:50:34 GMT
Author: dblevins
Date: Wed Oct 28 04:50:33 2009
New Revision: 830443

URL: http://svn.apache.org/viewvc?rev=830443&view=rev
Log:
Update wadi clustering support with latest EjbDeployment changes

Modified:
    geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ClusteredStatefulDeployment.java
    geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java

Modified: geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ClusteredStatefulDeployment.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ClusteredStatefulDeployment.java?rev=830443&r1=830442&r2=830443&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ClusteredStatefulDeployment.java
(original)
+++ geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ClusteredStatefulDeployment.java
Wed Oct 28 04:50:33 2009
@@ -40,12 +40,13 @@
 import org.apache.geronimo.security.jacc.RunAsSource;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.openejb.Container;
+import org.apache.openejb.core.CoreDeploymentInfo;
 
 /**
  *
  * @version $Rev:$ $Date:$
  */
-public class ClusteredStatefulDeployment extends EjbDeployment implements GBeanLifecycle
{
+public class ClusteredStatefulDeployment extends EjbDeployment {
 
     private final SessionManager sessionManager;
 
@@ -145,20 +146,9 @@
         this.sessionManager = sessionManager;
     }
 
-    public void doStart() throws Exception {
-        start();
-    }
-
-    public void doStop() throws Exception {
-        stop();
-    }
-
-    public void doFail() {
-        stop();
-    }
-
-    protected void start() throws Exception {
-        super.start();
+    @Override
+    protected EjbDeployment initialize(CoreDeploymentInfo deploymentInfo) {
+        super.initialize(deploymentInfo);
 
         Container container = deploymentInfo.getContainer();
         if (null == container) {
@@ -170,18 +160,22 @@
         }
         SessionManagerTracker sessionManagerTracker = (SessionManagerTracker) container;
         sessionManagerTracker.addSessionManager(deploymentId, sessionManager);
+
+        return this;
     }
 
-    protected void stop() {
-        if (null != deploymentInfo) {
-            Container container = deploymentInfo.getContainer();
+    @Override
+    protected void destroy() {
+        CoreDeploymentInfo info = deploymentInfo.get();
+        if (null != info) {
+            Container container = info.getContainer();
             if (null != container) {
                 SessionManagerTracker sessionManagerTracker = (SessionManagerTracker) container;
                 sessionManagerTracker.removeSessionManager(deploymentId, sessionManager);
             }
         }
 
-        super.stop();
+        super.destroy();
     }
 
     public static final GBeanInfo GBEAN_INFO;

Modified: geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java?rev=830443&r1=830442&r2=830443&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
(original)
+++ geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
Wed Oct 28 04:50:33 2009
@@ -272,7 +272,7 @@
         return true;
     }
 
-    EjbDeployment initialize(CoreDeploymentInfo deploymentInfo) {
+    protected EjbDeployment initialize(CoreDeploymentInfo deploymentInfo) {
         try {
             javaCompSubContext = (Context) deploymentInfo.getJndiEnc().lookup("java:comp");
             if (componentContext != null) {
@@ -289,7 +289,7 @@
         }
     }
 
-    void destroy() {
+    protected void destroy() {
         CoreDeploymentInfo info = deploymentInfo.getAndSet(null);
         if (info != null) {
             info.set(EjbDeployment.class, null);



Mime
View raw message