geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r472068 - in /geronimo/server/trunk: configs/wadi-clustering/ configs/wadi-clustering/src/plan/ modules/geronimo-clustering-wadi/ modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/
Date Tue, 07 Nov 2006 11:27:48 GMT
Author: gdamour
Date: Tue Nov  7 03:27:47 2006
New Revision: 472068

URL: http://svn.apache.org/viewvc?view=rev&rev=472068
Log:
* Refresh code with recently deployed WADI snapshot; and
* Drop wadi-activecluster Dispatcher implementation.

Removed:
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/ActiveClusterDispatcherHolder.java
Modified:
    geronimo/server/trunk/configs/wadi-clustering/pom.xml
    geronimo/server/trunk/configs/wadi-clustering/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-clustering-wadi/pom.xml
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicaStorageFactoryGBean.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicationManagerFactoryGBean.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicWADISessionManager.java

Modified: geronimo/server/trunk/configs/wadi-clustering/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/wadi-clustering/pom.xml?view=diff&rev=472068&r1=472067&r2=472068
==============================================================================
--- geronimo/server/trunk/configs/wadi-clustering/pom.xml (original)
+++ geronimo/server/trunk/configs/wadi-clustering/pom.xml Tue Nov  7 03:27:47 2006
@@ -39,7 +39,6 @@
         <PlanNbReplica>2</PlanNbReplica>
         <PlanClusterName>DEFAULT_CLUSTER</PlanClusterName>
         <PlanInactiveTime>3600</PlanInactiveTime>
-        <PlanClusterUri>tcp://localhost:61618</PlanClusterUri>
     </properties>
 
     <dependencies>
@@ -64,21 +63,6 @@
         <dependency>
             <groupId>org.codehaus.wadi</groupId>
             <artifactId>wadi-group</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.codehaus.wadi</groupId>
-            <artifactId>wadi-activecluster</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>incubator-activemq</groupId>
-            <artifactId>activecluster</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>incubator-activemq</groupId>
-             <artifactId>activemq</artifactId>
         </dependency>
 
         <dependency>

Modified: geronimo/server/trunk/configs/wadi-clustering/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/wadi-clustering/src/plan/plan.xml?view=diff&rev=472068&r1=472067&r2=472068
==============================================================================
--- geronimo/server/trunk/configs/wadi-clustering/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/wadi-clustering/src/plan/plan.xml Tue Nov  7 03:27:47 2006
@@ -29,17 +29,6 @@
         <attribute name="nbReplica">${PlanNbReplica}</attribute>
     </gbean>
 
-    <!--
-    <gbean name="DefaultDispatcherHolder" class="org.apache.geronimo.clustering.wadi.ActiveClusterDispatcherHolder">
-        <attribute name="clusterName">${PlanClusterName}</attribute>
-        <attribute name="clusterUri">${PlanClusterUri}</attribute>
-        <attribute name="inactiveTime">${PlanInactiveTime}</attribute>
-        <reference name="Node">
-            <name>Node</name>
-        </reference>
-    </gbean>
-    -->
-
     <gbean name="DefaultDispatcherHolder" class="org.apache.geronimo.clustering.wadi.TribesDispatcherHolder">
         <attribute name="clusterName">${PlanClusterName}</attribute>
         <attribute name="inactiveTime">${PlanInactiveTime}</attribute>

Modified: geronimo/server/trunk/modules/geronimo-clustering-wadi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-wadi/pom.xml?view=diff&rev=472068&r1=472067&r2=472068
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-wadi/pom.xml (original)
+++ geronimo/server/trunk/modules/geronimo-clustering-wadi/pom.xml Tue Nov  7 03:27:47 2006
@@ -55,15 +55,9 @@
         </dependency>
 
         <dependency>
-            <groupId>${pom.groupId}</groupId>
-            <artifactId>geronimo-jetty</artifactId>
-            <version>${version}</version>
-        </dependency>
-        
-        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-servlet_2.4_spec</artifactId>
-<scope>provided</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>
@@ -78,14 +72,8 @@
         
         <dependency>
             <groupId>org.codehaus.wadi</groupId>
-            <artifactId>wadi-activecluster</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.codehaus.wadi</groupId>
             <artifactId>wadi-tribes</artifactId>
         </dependency>
-
     </dependencies>
     
 </project>

Modified: geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicaStorageFactoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicaStorageFactoryGBean.java?view=diff&rev=472068&r1=472067&r2=472068
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicaStorageFactoryGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicaStorageFactoryGBean.java
Tue Nov  7 03:27:47 2006
@@ -1,19 +1,39 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
 package org.apache.geronimo.clustering.wadi;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.codehaus.wadi.group.Dispatcher;
 import org.codehaus.wadi.replication.storage.ReplicaStorage;
 import org.codehaus.wadi.replication.storage.ReplicaStorageFactory;
 import org.codehaus.wadi.replication.storage.basic.BasicReplicaStorageFactory;
+import org.codehaus.wadi.servicespace.ServiceSpace;
 
+/**
+ *
+ * @version $Rev$ $Date$
+ */
 public class BasicReplicaStorageFactoryGBean implements ReplicaStorageFactory, GBeanLifecycle
{
     private BasicReplicaStorageFactory storageFactory;
     
-    public ReplicaStorage factory(Dispatcher dispatcher) {
-        return storageFactory.factory(dispatcher);
+    public ReplicaStorage factory(ServiceSpace serviceSpace) {
+        return storageFactory.factory(serviceSpace);
     }
 
     public void doFail() {

Modified: geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicationManagerFactoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicationManagerFactoryGBean.java?view=diff&rev=472068&r1=472067&r2=472068
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicationManagerFactoryGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicationManagerFactoryGBean.java
Tue Nov  7 03:27:47 2006
@@ -1,22 +1,40 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
 package org.apache.geronimo.clustering.wadi;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.codehaus.wadi.group.Dispatcher;
 import org.codehaus.wadi.replication.manager.ReplicationManager;
 import org.codehaus.wadi.replication.manager.ReplicationManagerFactory;
 import org.codehaus.wadi.replication.manager.basic.BasicReplicationManagerFactory;
-import org.codehaus.wadi.replication.storage.ReplicaStorageFactory;
 import org.codehaus.wadi.replication.strategy.BackingStrategyFactory;
+import org.codehaus.wadi.servicespace.ServiceSpace;
 
+/**
+ *
+ * @version $Rev$ $Date$
+ */
 public class BasicReplicationManagerFactoryGBean implements ReplicationManagerFactory, GBeanLifecycle
{
     private ReplicationManagerFactory factory;
-    
-    public ReplicationManager factory(Dispatcher dispatcher, ReplicaStorageFactory replicaStoragefactory,
-            BackingStrategyFactory backingStrategyFactory) {
-        return factory.factory(dispatcher, replicaStoragefactory, backingStrategyFactory);
+
+    public ReplicationManager factory(ServiceSpace serviceSpace, BackingStrategyFactory backingStrategyFactory)
{
+        return factory.factory(serviceSpace, backingStrategyFactory);
     }
     
     public void doFail() {

Modified: geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicWADISessionManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicWADISessionManager.java?view=diff&rev=472068&r1=472067&r2=472068
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicWADISessionManager.java
(original)
+++ geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicWADISessionManager.java
Tue Nov  7 03:27:47 2006
@@ -51,7 +51,6 @@
 import org.codehaus.wadi.PoolableInvocationWrapperPool;
 import org.codehaus.wadi.SessionPool;
 import org.codehaus.wadi.Streamer;
-import org.codehaus.wadi.ValuePool;
 import org.codehaus.wadi.group.Dispatcher;
 import org.codehaus.wadi.impl.AbsoluteEvicter;
 import org.codehaus.wadi.impl.ClusterContextualiser;
@@ -67,16 +66,19 @@
 import org.codehaus.wadi.impl.SimpleStreamer;
 import org.codehaus.wadi.impl.SimpleValuePool;
 import org.codehaus.wadi.impl.StatelessContextualiser;
+import org.codehaus.wadi.replication.contextualizer.ReplicaAwareContextualiser;
+import org.codehaus.wadi.replication.manager.ReplicaterAdapterFactory;
+import org.codehaus.wadi.replication.manager.ReplicationManager;
 import org.codehaus.wadi.replication.manager.ReplicationManagerFactory;
+import org.codehaus.wadi.replication.manager.basic.SessionReplicationManager;
+import org.codehaus.wadi.replication.storage.ReplicaStorage;
 import org.codehaus.wadi.replication.storage.ReplicaStorageFactory;
 import org.codehaus.wadi.replication.strategy.BackingStrategyFactory;
-import org.codehaus.wadi.servicespace.ServiceName;
+import org.codehaus.wadi.servicespace.ServiceRegistry;
 import org.codehaus.wadi.servicespace.ServiceSpaceName;
 import org.codehaus.wadi.servicespace.basic.BasicServiceSpace;
-import org.codehaus.wadi.web.AttributesFactory;
 import org.codehaus.wadi.web.WebSession;
 import org.codehaus.wadi.web.WebSessionPool;
-import org.codehaus.wadi.web.WebSessionWrapperFactory;
 import org.codehaus.wadi.web.impl.AtomicallyReplicableSessionFactory;
 import org.codehaus.wadi.web.impl.DistributableAttributesFactory;
 import org.codehaus.wadi.web.impl.DistributableValueFactory;
@@ -95,8 +97,8 @@
     private static final Log log = LogFactory.getLog(BasicWADISessionManager.class);
 
     private final WADISessionManagerConfigInfo configInfo;
-    private final ReplicationManagerFactory replicationManagerFactory;
-    private final ReplicaStorageFactory replicaStorageFactory;
+    private final ReplicationManagerFactory repManagerFactory;
+    private final ReplicaStorageFactory repStorageFactory;
     private final BackingStrategyFactory backingStrategyFactory;
     private final DispatcherHolder dispatcherHolder;
     private final Set listeners;
@@ -105,12 +107,12 @@
     private BasicServiceSpace serviceSpace;
 
     public BasicWADISessionManager(WADISessionManagerConfigInfo configInfo,
-            ReplicationManagerFactory replicationManagerFactory, ReplicaStorageFactory replicaStorageFactory,
+            ReplicationManagerFactory repManagerFactory, ReplicaStorageFactory repStorageFactory,
             BackingStrategyFactory backingStrategyFactory, DispatcherHolder dispatcherHolder)
{
         this.configInfo = configInfo;
         this.dispatcherHolder = dispatcherHolder;
-        this.replicationManagerFactory = replicationManagerFactory;
-        this.replicaStorageFactory = replicaStorageFactory;
+        this.repManagerFactory = repManagerFactory;
+        this.repStorageFactory = repStorageFactory;
         this.backingStrategyFactory = backingStrategyFactory;
 
         listeners = new HashSet();
@@ -126,21 +128,15 @@
         Streamer streamer = new SimpleStreamer();
         Collapser collapser = new HashingCollapser(1024, 10000);
         Map mmap = Collections.synchronizedMap(new HashMap());
+        WebSessionPool sessionPool = new SimpleSessionPool(new AtomicallyReplicableSessionFactory());
 
         // end of contextualiser stack
         Contextualiser contextualiser = new DummyContextualiser();
 
         // replica aware contextualiser
-        // ReplicationManager replicationManager =
-        // replicationManagerFactory.factory(dispatcher,
-        // replicaStorageFactory,
-        // backingStrategyFactory);
-        // DistributableManagerRehydrater sessionRehydrater = new
-        // DistributableManagerRehydrater();
-        // ReplicationManager sessionRepManager = new
-        // SessionReplicationManager(replicationManager, sessionRehydrater);
-        // contextualiser = new ReplicaAwareContextualiser(contextualiser,
-        // sessionRepManager);
+//         ReplicationManager replicationManager = repManagerFactory.factory(serviceSpace,
backingStrategyFactory);
+//         ReplicationManager sessionRepManager = new SessionReplicationManager(replicationManager,
sessionPool);
+//         contextualiser = new ReplicaAwareContextualiser(contextualiser, sessionRepManager);
 
         // cluster aware contextualiser
         contextualiser = new ClusterContextualiser(contextualiser, collapser, new HybridRelocater(5000,
5000, true));
@@ -152,7 +148,6 @@
         contextualiser = new SerialContextualiser(contextualiser, collapser, mmap);
 
         // in-memory contextualiser
-        WebSessionPool sessionPool = new SimpleSessionPool(new AtomicallyReplicableSessionFactory());
         Evicter mevicter = new AbsoluteEvicter(configInfo.getSweepInterval(), strictOrdering,
                 configInfo.getSessionTimeoutSeconds());
         SessionPool contextPool = new WebSessionToSessionPoolAdapter(sessionPool);
@@ -162,14 +157,24 @@
         contextualiser = new SerialContextualiserFrontingMemory(contextualiser, new HashingCollapser(1024,
10000));
 
         // Manager
-        AttributesFactory attributesFactory = new DistributableAttributesFactory();
-        ValuePool valuePool = new SimpleValuePool(new DistributableValueFactory());
-        WebSessionWrapperFactory wrapperFactory = new StandardSessionWrapperFactory();
-        manager = new ClusteredManager(sessionPool, attributesFactory, valuePool, wrapperFactory,
null, contextualiser,
-                mmap, new DummyRouter(), true, streamer, true, new DummyReplicaterFactory(),
-                // new ReplicaterAdapterFactory(replicationManager),
-                null, null, dispatcher, configInfo.getNumPartitions(), collapser);
-        // sessionRehydrater.setManager(manager);
+        manager = new ClusteredManager(sessionPool, 
+                new DistributableAttributesFactory(), 
+                new SimpleValuePool(new DistributableValueFactory()), 
+                new StandardSessionWrapperFactory(), 
+                null, 
+                contextualiser,
+                mmap, 
+                new DummyRouter(), 
+                false, 
+                streamer, 
+                true,
+                new DummyReplicaterFactory(),
+//                new ReplicaterAdapterFactory(replicationManager, sessionPool),
+                null, 
+                null, 
+                dispatcher, 
+                configInfo.getNumPartitions(), 
+                collapser);
 
         manager.init(new ManagerConfig() {
             public void callback(Manager manager) {
@@ -180,7 +185,10 @@
             }
         });
 
-        serviceSpace.getServiceRegistry().register(new ServiceName("ClusteredManager"), manager);
+        ServiceRegistry serviceRegistry = serviceSpace.getServiceRegistry();
+//        serviceRegistry.register(ReplicaStorage.NAME, repStorageFactory.factory(serviceSpace));
+//        serviceRegistry.register(ReplicationManager.NAME, replicationManager);
+        serviceRegistry.register(ClusteredManager.NAME, manager);
 
         serviceSpace.start();
     }



Mime
View raw message