Author: jacopoc
Date: Thu May 28 06:37:34 2009 New Revision: 779451 URL: http://svn.apache.org/viewvc?rev=779451&view=rev Log: Applied fix from trunk for revision: 778560 Modified: ofbiz/branches/release09.04/framework/base/config/ofbiz-containers.xml ofbiz/branches/release09.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Modified: ofbiz/branches/release09.04/framework/base/config/ofbiz-containers.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/base/config/ofbiz-containers.xml?rev=779451&r1=779450&r2=779451&view=diff ============================================================================== --- ofbiz/branches/release09.04/framework/base/config/ofbiz-containers.xml (original) +++ ofbiz/branches/release09.04/framework/base/config/ofbiz-containers.xml Thu May 28 06:37:34 2009 @@ -121,7 +121,7 @@ <property name="rep-valve-filter"> <property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;</property-value> </property> - <property name="manager-class" value="org.apache.catalina.cluster.session.DeltaManager"/> + <property name="manager-class" value="org.apache.catalina.ha.session.DeltaManager"/> <property name="debug" value="5"/> <property name="replication-mode" value="org.apache.catalina.tribes.transport.bio.PooledMultiSender"/> <property name="tcp-listen-host" value="auto"/> @@ -129,7 +129,7 @@ <property name="tcp-sector-timeout" value="100"/> <property name="tcp-thread-count" value="6"/> <property name="mcast-bind-addr" value="192.168.2.1"/> - <property name="mcast-addr" value="224.0.0.1"/> + <property name="mcast-addr" value="228.0.0.4"/> <property name="mcast-port" value="45564"/> <property name="mcast-freq" value="500"/> <property name="mcast-drop-time" value="3000"/> Modified: ofbiz/branches/release09.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=779451&r1=779450&r2=779451&view=diff ============================================================================== --- ofbiz/branches/release09.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original) +++ ofbiz/branches/release09.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Thu May 28 06:37:34 2009 @@ -34,6 +34,7 @@ import org.ofbiz.base.container.Container; import org.ofbiz.base.container.ContainerConfig; import org.ofbiz.base.container.ContainerException; +import org.ofbiz.base.container.ContainerConfig.Container.Property; import org.ofbiz.base.util.*; import org.ofbiz.entity.GenericDelegator; @@ -422,14 +423,23 @@ } catch (Exception exc) { throw new ContainerException("Cluster configuration requires a valid replication-mode property: " + exc.getMessage()); } - String mgrClassName = ContainerConfig.getPropertyValue(clusterProps, "manager-class", "org.apache.catalina.cluster.session.DeltaManager"); + String mgrClassName = ContainerConfig.getPropertyValue(clusterProps, "manager-class", "org.apache.catalina.ha.session.DeltaManager"); //int debug = ContainerConfig.getPropertyValue(clusterProps, "debug", 0); // removed since 5.5.9? boolean expireSession = ContainerConfig.getPropertyValue(clusterProps, "expire-session", false); // removed since 5.5.9? boolean useDirty = ContainerConfig.getPropertyValue(clusterProps, "use-dirty", true); SimpleTcpCluster cluster = new SimpleTcpCluster(); cluster.setClusterName(clusterProps.name); - cluster.setManagerClassName(mgrClassName); + Manager manager = null; + try { + manager = (Manager)Class.forName(mgrClassName).newInstance(); + } catch(Exception exc) { + throw new ContainerException("Cluster configuration requires a valid manager-class property: " + exc.getMessage()); + } + //cluster.setManagerClassName(mgrClassName); + //host.setManager(manager); + //cluster.registerManager(manager); + cluster.setManagerTemplate((org.apache.catalina.ha.ClusterManager)manager); //cluster.setDebug(debug); // removed since 5.5.9? cluster.setExpireSessionsOnShutdown(expireSession); // removed since 5.5.9? cluster.setUseDirtyFlag(useDirty); @@ -510,8 +520,20 @@ } // configure persistent sessions - Manager sessionMgr = new StandardManager(); + Property clusterProp = clusterConfig.get(engine.getName()); + Manager sessionMgr = null; + if (clusterProp != null) { + String mgrClassName = ContainerConfig.getPropertyValue(clusterProp, "manager-class", "org.apache.catalina.ha.session.DeltaManager"); + try { + sessionMgr = (Manager)Class.forName(mgrClassName).newInstance(); + } catch(Exception exc) { + throw new ContainerException("Cluster configuration requires a valid manager-class property: " + exc.getMessage()); + } + } else { + sessionMgr = new StandardManager(); + } + // create the web application context StandardContext context = (StandardContext) embedded.createContext(mount, location); context.setJ2EEApplication(J2EE_APP); |
Free forum by Nabble | Edit this page |