geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r553189 - in /geronimo/server/trunk: modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/TribesDispatcherHolder.java pom.xml
Date Wed, 04 Jul 2007 12:24:49 GMT
Author: gdamour
Date: Wed Jul  4 05:24:48 2007
New Revision: 553189

URL: http://svn.apache.org/viewvc?view=rev&rev=553189
Log:
Move to WADI 2.0-SNAPSHOT and make the relevant changes to enable the
WADI administration console.

Modified:
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/TribesDispatcherHolder.java
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/TribesDispatcherHolder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/TribesDispatcherHolder.java?view=diff&rev=553189&r1=553188&r2=553189
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/TribesDispatcherHolder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/TribesDispatcherHolder.java
Wed Jul  4 05:24:48 2007
@@ -17,6 +17,7 @@
 package org.apache.geronimo.clustering.wadi;
 
 import java.net.URI;
+import java.util.Collections;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -26,7 +27,10 @@
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.codehaus.wadi.group.Dispatcher;
+import org.codehaus.wadi.group.DispatcherRegistry;
 import org.codehaus.wadi.group.MessageExchangeException;
+import org.codehaus.wadi.group.StaticDispatcherRegistry;
+import org.codehaus.wadi.servicespace.admin.AdminServiceSpace;
 import org.codehaus.wadi.tribes.TribesDispatcher;
 import org.codehaus.wadi.web.impl.URIEndPoint;
 
@@ -40,9 +44,10 @@
     private final URI endPointURI;
     private final String clusterName;
     private final Node node;
+    private final DispatcherRegistry dispatcherRegistry;
 
     private TribesDispatcher dispatcher;
-
+    private AdminServiceSpace adminServiceSpace;
 
     public TribesDispatcherHolder(URI endPointURI, String clusterName, Node node) {
         if (null == endPointURI) {
@@ -55,22 +60,46 @@
         this.endPointURI = endPointURI;
         this.clusterName = clusterName;
         this.node = node;
+        
+        dispatcherRegistry = new StaticDispatcherRegistry();
     }
 
     public void doStart() throws Exception {
-        dispatcher = new TribesDispatcher(clusterName, node.getName(), new URIEndPoint(endPointURI),
null);
+        dispatcher = new TribesDispatcher(clusterName,
+            node.getName(),
+            new URIEndPoint(endPointURI),
+            Collections.EMPTY_SET);
         dispatcher.start();
+        
+        adminServiceSpace = new AdminServiceSpace(dispatcher);
+        adminServiceSpace.start();
+        
+        dispatcherRegistry.register(dispatcher);
     }
 
     public void doStop() throws Exception {
+        if (null != adminServiceSpace) {
+            adminServiceSpace.stop();
+        }
+        
+        dispatcherRegistry.unregister(dispatcher);
         dispatcher.stop();
     }
 
     public void doFail() {
+        if (null != adminServiceSpace) {
+            try {
+                adminServiceSpace.stop();
+            } catch (Exception e) {
+                log.error("see nested", e);
+            }
+        }
+        
+        dispatcherRegistry.unregister(dispatcher);
         try {
             dispatcher.stop();
         } catch (MessageExchangeException e) {
-            log.error(e);
+            log.error("see nested", e);
         }
     }
     

Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?view=diff&rev=553189&r1=553188&r2=553189
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Wed Jul  4 05:24:48 2007
@@ -988,19 +988,19 @@
             <dependency>
                 <groupId>org.codehaus.wadi</groupId>
                 <artifactId>wadi-core</artifactId>
-                <version>2.0-M4</version>
+                <version>2.0-SNAPSHOT</version>
             </dependency>
 
             <dependency>
                 <groupId>org.codehaus.wadi</groupId>
                 <artifactId>wadi-group</artifactId>
-                <version>2.0-M4</version>
+                <version>2.0-SNAPSHOT</version>
             </dependency>
 
             <dependency>
                 <groupId>org.codehaus.wadi</groupId>
                 <artifactId>wadi-tribes</artifactId>
-                <version>2.0-M4</version>
+                <version>2.0-SNAPSHOT</version>
             </dependency>
 
             <dependency>



Mime
View raw message