geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r558233 - in /geronimo/server/trunk: configs/jetty6-clustering-builder-wadi/src/plan/ configs/wadi-clustering/src/plan/ modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/ modules/geronimo-jetty6-clustering-b...
Date Sat, 21 Jul 2007 03:24:03 GMT
Author: gdamour
Date: Fri Jul 20 20:24:01 2007
New Revision: 558233

URL: http://svn.apache.org/viewvc?view=rev&rev=558233
Log:
Drop ReplicationManager and ReplicaStorage GBeans. WADI's API has slightly
changed and it is no more possible to plug-in such strategies via this approach.

Pass in the ClassLoader of the configuration which is defining the
BasicWADISessionManager GBean to the WADI StackContext. This ClassLoader
is used to unserialize replicated sessions. Previously, replicated sessions
were not unserialized by their storages. They are no fully re-instantiated so 
that field or method level changes can be applied to them.

Removed:
    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
Modified:
    geronimo/server/trunk/configs/jetty6-clustering-builder-wadi/src/plan/plan.xml
    geronimo/server/trunk/configs/wadi-clustering/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicWADISessionManager.java
    geronimo/server/trunk/modules/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
    geronimo/server/trunk/modules/geronimo-jetty6-clustering-builder-wadi/src/main/xsd/geronimo-clustering-wadi-1.2.xsd
    geronimo/server/trunk/modules/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandler.java

Modified: geronimo/server/trunk/configs/jetty6-clustering-builder-wadi/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty6-clustering-builder-wadi/src/plan/plan.xml?view=diff&rev=558233&r1=558232&r2=558233
==============================================================================
--- geronimo/server/trunk/configs/jetty6-clustering-builder-wadi/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/jetty6-clustering-builder-wadi/src/plan/plan.xml Fri Jul
20 20:24:01 2007
@@ -23,8 +23,6 @@
     <gbean name="JettyClusteringBuilder" class="org.apache.geronimo.jetty6.cluster.wadi.builder.WADIJettyClusteringBuilder">
         <attribute name="defaultSweepInterval">${PlanDefaultSweepInterval}</attribute>
         <attribute name="defaultNumPartitions">${PlanDefaultNumPartitions}</attribute>
-        <attribute name="defaultReplicationManagerFactoryName">?name=DefaultReplicationManagerFactory</attribute>
-        <attribute name="defaultReplicaStorageFactoryName">?name=DefaultReplicaStorageFactory</attribute>
         <attribute name="defaultBackingStrategyFactoryName">?name=DefaultBackingStrategyFactory</attribute>
         <attribute name="defaultClusterName">?name=DefaultCluster</attribute>
         <xml-attribute name="defaultEnvironment">

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=558233&r1=558232&r2=558233
==============================================================================
--- geronimo/server/trunk/configs/wadi-clustering/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/wadi-clustering/src/plan/plan.xml Fri Jul 20 20:24:01 2007
@@ -20,12 +20,6 @@
 
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
 
-    <gbean name="DefaultReplicationManagerFactory" class="org.apache.geronimo.clustering.wadi.BasicReplicationManagerFactoryGBean">
-    </gbean>
-
-    <gbean name="DefaultReplicaStorageFactory" class="org.apache.geronimo.clustering.wadi.BasicReplicaStorageFactoryGBean">
-    </gbean>
-
     <gbean name="DefaultBackingStrategyFactory" class="org.apache.geronimo.clustering.wadi.RoundRobinBackingStrategyFactoryGBean">
         <attribute name="nbReplica">${PlanNbReplica}</attribute>
     </gbean>

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=558233&r1=558232&r2=558233
==============================================================================
--- 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
Fri Jul 20 20:24:01 2007
@@ -39,8 +39,6 @@
 import org.codehaus.wadi.core.manager.SessionMonitor;
 import org.codehaus.wadi.group.Dispatcher;
 import org.codehaus.wadi.group.Peer;
-import org.codehaus.wadi.replication.manager.ReplicationManagerFactory;
-import org.codehaus.wadi.replication.storage.ReplicaStorageFactory;
 import org.codehaus.wadi.replication.strategy.BackingStrategyFactory;
 import org.codehaus.wadi.servicespace.ServiceSpace;
 import org.codehaus.wadi.servicespace.ServiceSpaceName;
@@ -52,10 +50,9 @@
 public class BasicWADISessionManager implements GBeanLifecycle, SessionManager, WADISessionManager
{
     private static final Log log = LogFactory.getLog(BasicWADISessionManager.class);
 
+    private final ClassLoader cl;
     private final WADICluster cluster;
     private final WADISessionManagerConfigInfo configInfo;
-    private final ReplicationManagerFactory repManagerFactory;
-    private final ReplicaStorageFactory repStorageFactory;
     private final BackingStrategyFactory backingStrategyFactory;
     private final CopyOnWriteArrayList<SessionListener> listeners;
 
@@ -63,15 +60,14 @@
     private SessionMonitor sessionMonitor;
     private ServiceSpace serviceSpace;
 
-    public BasicWADISessionManager(WADISessionManagerConfigInfo configInfo,
+
+    public BasicWADISessionManager(ClassLoader cl,
+            WADISessionManagerConfigInfo configInfo,
             WADICluster cluster,
-            ReplicationManagerFactory repManagerFactory,
-            ReplicaStorageFactory repStorageFactory,
             BackingStrategyFactory backingStrategyFactory) {
+        this.cl = cl;
         this.configInfo = configInfo;
         this.cluster = cluster;
-        this.repManagerFactory = repManagerFactory;
-        this.repStorageFactory = repStorageFactory;
         this.backingStrategyFactory = backingStrategyFactory;
 
         listeners = new CopyOnWriteArrayList<SessionListener>();
@@ -81,13 +77,12 @@
         Dispatcher underlyingDisp = cluster.getCluster().getDispatcher();
         
         ServiceSpaceName serviceSpaceName = new ServiceSpaceName(configInfo.getServiceSpaceURI());
-        StackContext stackContext = new StackContext(serviceSpaceName,
+        StackContext stackContext = new StackContext(cl,
+                serviceSpaceName,
                 underlyingDisp,
                 configInfo.getSessionTimeoutSeconds(),
                 configInfo.getNumPartitions(),
                 configInfo.getSweepInterval(),
-                repManagerFactory,
-                repStorageFactory,
                 backingStrategyFactory);
         stackContext.build();
 
@@ -200,31 +195,25 @@
     public static final String GBEAN_ATTR_WADI_CONFIG_INFO = "wadiConfigInfo";
 
     public static final String GBEAN_REF_CLUSTER = "Cluster";
-    public static final String GBEAN_REF_REPLICATION_MANAGER_FACTORY = "ReplicationManagerFactory";
-    public static final String GBEAN_REF_REPLICA_STORAGE_FACTORY = "ReplicaStorageFactory";
     public static final String GBEAN_REF_BACKING_STRATEGY_FACTORY = "BackingStrategyFactory";
 
     static {
         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic("WADI Session Manager",
                 BasicWADISessionManager.class, NameFactory.GERONIMO_SERVICE);
 
+        infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
         infoBuilder.addAttribute(GBEAN_ATTR_WADI_CONFIG_INFO, WADISessionManagerConfigInfo.class,
true);
 
         infoBuilder.addReference(GBEAN_REF_CLUSTER, WADICluster.class, NameFactory.GERONIMO_SERVICE);
-        infoBuilder.addReference(GBEAN_REF_REPLICATION_MANAGER_FACTORY, ReplicationManagerFactory.class,
-            NameFactory.GERONIMO_SERVICE);
-        infoBuilder.addReference(GBEAN_REF_REPLICA_STORAGE_FACTORY, ReplicaStorageFactory.class,
-                NameFactory.GERONIMO_SERVICE);
         infoBuilder.addReference(GBEAN_REF_BACKING_STRATEGY_FACTORY, BackingStrategyFactory.class,
                 NameFactory.GERONIMO_SERVICE);
 
         infoBuilder.addInterface(SessionManager.class);
         infoBuilder.addInterface(WADISessionManager.class);
 
-        infoBuilder.setConstructor(new String[] { GBEAN_ATTR_WADI_CONFIG_INFO,
+        infoBuilder.setConstructor(new String[] { "classLoader", 
+                GBEAN_ATTR_WADI_CONFIG_INFO,
                 GBEAN_REF_CLUSTER, 
-                GBEAN_REF_REPLICATION_MANAGER_FACTORY, 
-                GBEAN_REF_REPLICA_STORAGE_FACTORY,
                 GBEAN_REF_BACKING_STRATEGY_FACTORY });
 
         GBEAN_INFO = infoBuilder.getBeanInfo();

Modified: geronimo/server/trunk/modules/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java?view=diff&rev=558233&r1=558232&r2=558233
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
Fri Jul 20 20:24:01 2007
@@ -28,7 +28,6 @@
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
-import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
@@ -61,23 +60,17 @@
 
     private final int defaultSweepInterval;
     private final int defaultNumPartitions;
-    private final AbstractNameQuery defaultRepManagerFactoryName;
-    private final AbstractNameQuery defaultRepStorageFactoryName;
     private final AbstractNameQuery defaultBackingStrategyFactoryName;
     private final AbstractNameQuery defaultClusterName;
     private final Environment defaultEnvironment;
 
     public WADIJettyClusteringBuilder(int defaultSweepInterval,
             int defaultNumPartitions,
-            AbstractNameQuery defaultRepManagerFactoryName,
-            AbstractNameQuery defaultRepStorageFactoryName,
             AbstractNameQuery defaultBackingStrategyFactoryName,
             AbstractNameQuery defaultClusterName,
             Environment defaultEnvironment) {
         this.defaultSweepInterval = defaultSweepInterval;
         this.defaultNumPartitions = defaultNumPartitions;
-        this.defaultRepManagerFactoryName = defaultRepManagerFactoryName;
-        this.defaultRepStorageFactoryName = defaultRepStorageFactoryName;
         this.defaultBackingStrategyFactoryName = defaultBackingStrategyFactoryName;
         this.defaultClusterName = defaultClusterName;
         this.defaultEnvironment = defaultEnvironment;
@@ -146,8 +139,6 @@
 
         setConfigInfo(clustering, webModuleData, beanData);
         setCluster(clustering, beanData);
-        setReplicationManagerFactory(clustering, beanData);
-        setReplicaStorageFactory(clustering, beanData);
         setBackingStrategyFactory(clustering, beanData);
 
         moduleContext.addGBean(beanData);
@@ -197,26 +188,6 @@
         beanData.setReferencePatterns(BasicWADISessionManager.GBEAN_REF_BACKING_STRATEGY_FACTORY,
patterns);
     }
 
-    private void setReplicaStorageFactory(GerClusteringWadiType clustering, GBeanData beanData)
{
-        Set patterns = new HashSet();
-        if (clustering.isSetReplicaStorageFactory()) {
-            addAbstractNameQueries(patterns, clustering.getReplicaStorageFactory().getPatternArray());
-        } else {
-            patterns.add(defaultRepStorageFactoryName);
-        }
-        beanData.setReferencePatterns(BasicWADISessionManager.GBEAN_REF_REPLICA_STORAGE_FACTORY,
patterns);
-    }
-
-    private void setReplicationManagerFactory(GerClusteringWadiType clustering, GBeanData
beanData) {
-        Set patterns = new HashSet();
-        if (clustering.isSetReplicationManagerFactory()) {
-            addAbstractNameQueries(patterns, clustering.getReplicationManagerFactory().getPatternArray());
-        } else {
-            patterns.add(defaultRepManagerFactoryName);
-        }
-        beanData.setReferencePatterns(BasicWADISessionManager.GBEAN_REF_REPLICATION_MANAGER_FACTORY,
patterns);
-    }
-
     private AbstractName addPreHandlerFactory(DeploymentContext moduleContext,
             GBeanData webModuleData, AbstractName sessionManagerName) throws GBeanAlreadyExistsException
{
         AbstractName name = moduleContext.getNaming().createChildName(moduleContext.getModuleName(),
@@ -258,8 +229,6 @@
 
     public static final String GBEAN_ATTR_DFT_SWEEP_INTERVAL = "defaultSweepInterval";
     public static final String GBEAN_ATTR_DFT_NUM_PARTITIONS = "defaultNumPartitions";
-    public static final String GBEAN_ATTR_DFT_REP_MANAGER_FACTORY_NAME = "defaultReplicationManagerFactoryName";
-    public static final String GBEAN_ATTR_DFT_REP_STORAGE_FACTORY_NAME = "defaultReplicaStorageFactoryName";
     public static final String GBEAN_ATTR_DFT_BACKING_STRATEGY_FACTORY_NAME = "defaultBackingStrategyFactoryName";
     public static final String GBEAN_ATTR_DFT_CLUSTER_NAME = "defaultClusterName";
     public static final String GBEAN_ATTR_DFT_ENVIRONMENT = "defaultEnvironment";
@@ -271,16 +240,12 @@
 
         infoBuilder.addAttribute(GBEAN_ATTR_DFT_SWEEP_INTERVAL, int.class, true);
         infoBuilder.addAttribute(GBEAN_ATTR_DFT_NUM_PARTITIONS, int.class, true);
-        infoBuilder.addAttribute(GBEAN_ATTR_DFT_REP_MANAGER_FACTORY_NAME, AbstractNameQuery.class,
true);
-        infoBuilder.addAttribute(GBEAN_ATTR_DFT_REP_STORAGE_FACTORY_NAME, AbstractNameQuery.class,
true);
         infoBuilder.addAttribute(GBEAN_ATTR_DFT_BACKING_STRATEGY_FACTORY_NAME, AbstractNameQuery.class,
true);
         infoBuilder.addAttribute(GBEAN_ATTR_DFT_CLUSTER_NAME, AbstractNameQuery.class, true);
         infoBuilder.addAttribute(GBEAN_ATTR_DFT_ENVIRONMENT, Environment.class, true);
 
         infoBuilder.setConstructor(new String[]{GBEAN_ATTR_DFT_SWEEP_INTERVAL,
                 GBEAN_ATTR_DFT_NUM_PARTITIONS,
-                GBEAN_ATTR_DFT_REP_MANAGER_FACTORY_NAME,
-                GBEAN_ATTR_DFT_REP_STORAGE_FACTORY_NAME,
                 GBEAN_ATTR_DFT_BACKING_STRATEGY_FACTORY_NAME,
                 GBEAN_ATTR_DFT_CLUSTER_NAME,
                 GBEAN_ATTR_DFT_ENVIRONMENT});

Modified: geronimo/server/trunk/modules/geronimo-jetty6-clustering-builder-wadi/src/main/xsd/geronimo-clustering-wadi-1.2.xsd
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6-clustering-builder-wadi/src/main/xsd/geronimo-clustering-wadi-1.2.xsd?view=diff&rev=558233&r1=558232&r2=558233
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6-clustering-builder-wadi/src/main/xsd/geronimo-clustering-wadi-1.2.xsd
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6-clustering-builder-wadi/src/main/xsd/geronimo-clustering-wadi-1.2.xsd
Fri Jul 20 20:24:01 2007
@@ -40,8 +40,6 @@
                 <xs:element name="sweepInterval" type="xs:integer" minOccurs="0"/>
                 <xs:element name="numPartitions" type="xs:integer" minOccurs="0"/>
                 <xs:element name="cluster" type="naming:gbean-refType" minOccurs="0"/>
-                <xs:element name="replication-manager-factory" type="naming:gbean-refType"
minOccurs="0"/>
-                <xs:element name="replica-storage-factory" type="naming:gbean-refType"
minOccurs="0"/>
                 <xs:element name="backing-strategy-factory" type="naming:gbean-refType"
minOccurs="0"/>
             </xs:sequence>
         </xs:extension>

Modified: geronimo/server/trunk/modules/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandler.java?view=diff&rev=558233&r1=558232&r2=558233
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandler.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandler.java
Fri Jul 20 20:24:01 2007
@@ -57,7 +57,7 @@
         }
 
         public void invoke() throws ClusteredInvocationException {
-            WebInvocation invocation = new WebInvocation();
+            WebInvocation invocation = new WebInvocation(5000);
             FilterChain chainAdapter = new FilterChain() {
                 public void doFilter(ServletRequest request, ServletResponse response) throws
IOException, ServletException {
                     try {



Mime
View raw message