svn commit: r674732 - in /ofbiz/trunk/framework: base/lib/j2eespecs/ catalina/lib/ catalina/src/org/ofbiz/catalina/container/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r674732 - in /ofbiz/trunk/framework: base/lib/j2eespecs/ catalina/lib/ catalina/src/org/ofbiz/catalina/container/

jacopoc
Author: jacopoc
Date: Mon Jul  7 23:44:12 2008
New Revision: 674732

URL: http://svn.apache.org/viewvc?rev=674732&view=rev
Log:
As a temp fix for issues with "OutOfMemoryError: Java heap space" errors reported after the upgrade of Tomcat, I'm downgrading from Tomcat 6.0.16 to Tomcat 5.5.23.
As soon as the issues is fixed we will commit back the code; this effort is tracked in OFBIZ-1863

Added:
    ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-jsp_2.0_spec-1.0.jar   (with props)
    ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-servlet_2.4_spec-1.0.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/catalina-cluster.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/catalina-optional.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/catalina.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/jasper-compiler-jdt.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/jasper-compiler.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/jasper-runtime.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/naming-factory.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/naming-resources.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/servlets-default.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/tomcat-ajp.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/tomcat-coyote.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/tomcat-http.jar   (with props)
    ofbiz/trunk/framework/catalina/lib/tomcat-util.jar   (with props)
Removed:
    ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.16-annotations_spec.jar
    ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.16-el_2.1_spec.jar
    ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.16-jsp_2.1_spec.jar
    ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.16-servlet_2.5_spec.jar
    ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-catalina-ha.jar
    ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-catalina-tribes.jar
    ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-catalina.jar
    ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-jasper-el.jar
    ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-jasper-jdt.jar
    ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-jasper.jar
    ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-tomcat-coyote.jar
    ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-tomcat-dbcp.jar
    ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-tomcat-juli-adapters.jar
    ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-tomcat-juli.jar
Modified:
    ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
    ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java

Added: ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-jsp_2.0_spec-1.0.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-jsp_2.0_spec-1.0.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-jsp_2.0_spec-1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-servlet_2.4_spec-1.0.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-servlet_2.4_spec-1.0.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-servlet_2.4_spec-1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/catalina-cluster.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/catalina-cluster.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/catalina-cluster.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/catalina-optional.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/catalina-optional.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/catalina-optional.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/catalina.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/catalina.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/catalina.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/jasper-compiler-jdt.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/jasper-compiler-jdt.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/jasper-compiler-jdt.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/jasper-compiler.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/jasper-compiler.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/jasper-compiler.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/jasper-runtime.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/jasper-runtime.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/jasper-runtime.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/naming-factory.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/naming-factory.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/naming-factory.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/naming-resources.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/naming-resources.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/naming-resources.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/servlets-default.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/servlets-default.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/servlets-default.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/tomcat-ajp.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-ajp.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-ajp.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/tomcat-coyote.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-coyote.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-coyote.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/tomcat-http.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-http.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-http.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/catalina/lib/tomcat-util.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-util.jar?rev=674732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-util.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=674732&r1=674731&r2=674732&view=diff
==============================================================================
--- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original)
+++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Mon Jul  7 23:44:12 2008
@@ -44,16 +44,11 @@
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Manager;
 import org.apache.catalina.ServerFactory;
-import org.apache.catalina.ha.tcp.ReplicationValve;
-import org.apache.catalina.ha.tcp.SimpleTcpCluster;
-import org.apache.catalina.tribes.Channel;
-import org.apache.catalina.tribes.ChannelReceiver;
-import org.apache.catalina.tribes.group.GroupChannel;
-import org.apache.catalina.tribes.membership.McastService;
-import org.apache.catalina.tribes.transport.MultiPointSender;
-import org.apache.catalina.tribes.transport.ReplicationTransmitter;
-import org.apache.catalina.tribes.transport.nio.NioReceiver;
-
+import org.apache.catalina.cluster.mcast.McastService;
+import org.apache.catalina.cluster.tcp.ReplicationListener;
+import org.apache.catalina.cluster.tcp.ReplicationTransmitter;
+import org.apache.catalina.cluster.tcp.ReplicationValve;
+import org.apache.catalina.cluster.tcp.SimpleTcpCluster;
 import org.apache.catalina.connector.Connector;
 import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.core.StandardEngine;
@@ -229,7 +224,7 @@
             ProtocolHandler ph = con.getProtocolHandler();
             if (ph instanceof Http11Protocol) {
                 Http11Protocol hph = (Http11Protocol) ph;
-                Debug.logInfo("Connector " + hph.getProtocols() + " @ " + hph.getPort() + " - " +
+                Debug.logInfo("Connector " + hph.getProtocol() + " @ " + hph.getPort() + " - " +
                     (hph.getSecure() ? "secure" : "not-secure") + " [" + con.getProtocolHandlerClassName() + "] started.", module);
             } else {
                 Debug.logInfo("Connector " + con.getProtocol() + " @ " + con.getPort() + " - " +
@@ -385,10 +380,10 @@
             mcast.setMcastBindAddress(mcb);
         }
 
-        mcast.setAddress(mca);
-        mcast.setPort(mcp);
+        mcast.setMcastAddr(mca);
+        mcast.setMcastPort(mcp);
         mcast.setMcastDropTime(mcd);
-        mcast.setFrequency(mcf);
+        mcast.setMcastFrequency(mcf);
 
         String tla = ContainerConfig.getPropertyValue(clusterProps, "tcp-listen-host", "auto");
         int tlp = ContainerConfig.getPropertyValue(clusterProps, "tcp-listen-port", 4001);
@@ -400,21 +395,16 @@
             throw new ContainerException("Cluster configuration requires tcp-listen-port property");
         }
 
-        NioReceiver listener = new NioReceiver();
-        listener.setAddress(tla);
-        listener.setPort(tlp);
-        listener.setSelectorTimeout(tlt);
-        listener.setMaxThreads(tlc);
-        listener.setMinThreads(tlc);
+        ReplicationListener listener = new ReplicationListener();
+        listener.setTcpListenAddress(tla);
+        listener.setTcpListenPort(tlp);
+        listener.setTcpSelectorTimeout(tlt);
+        listener.setTcpThreadCount(tlc);
         //listener.setIsSenderSynchronized(false);
 
         ReplicationTransmitter trans = new ReplicationTransmitter();
-        try {
-            MultiPointSender mps = (MultiPointSender)Class.forName(ContainerConfig.getPropertyValue(clusterProps, "replication-mode", "org.apache.catalina.tribes.transport.bio.PooledMultiSender")).newInstance();
-            trans.setTransport(mps);
-        } catch(Exception exc) {
-            throw new ContainerException("Cluster configuration requires a valid replication-mode property: " + exc.getMessage());
-        }
+        trans.setReplicationMode(ContainerConfig.getPropertyValue(clusterProps, "replication-mode", "pooled"));
+
         String mgrClassName = ContainerConfig.getPropertyValue(clusterProps, "manager-class", "org.apache.catalina.cluster.session.DeltaManager");
         //int debug = ContainerConfig.getPropertyValue(clusterProps, "debug", 0);
         // removed since 5.5.9? boolean expireSession = ContainerConfig.getPropertyValue(clusterProps, "expire-session", false);
@@ -427,12 +417,9 @@
         // removed since 5.5.9? cluster.setExpireSessionsOnShutdown(expireSession);
         // removed since 5.5.9? cluster.setUseDirtyFlag(useDirty);
 
-        GroupChannel channel = new GroupChannel();
-        channel.setChannelReceiver(listener);
-        channel.setChannelSender(trans);
-        channel.setMembershipService(mcast);
-        
-        cluster.setChannel(channel);
+        cluster.setClusterReceiver(listener);
+        cluster.setClusterSender(trans);
+        cluster.setMembershipService(mcast);
         cluster.addValve(clusterValve);
         // removed since 5.5.9? cluster.setPrintToScreen(true);
 
@@ -510,9 +497,6 @@
         context.setJ2EEApplication(J2EE_APP);
         context.setJ2EEServer(J2EE_SERVER);
         context.setLoader(embedded.createLoader(ClassLoaderContainer.getClassLoader()));
-        
-        context.setCookies(appInfo.isSessionCookieAccepted());
-        context.addParameter("cookies", appInfo.isSessionCookieAccepted() ? "true" : "false");
 
         context.setDisplayName(appInfo.name);
         context.setDocBase(location);

Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java?rev=674732&r1=674731&r2=674732&view=diff
==============================================================================
--- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java (original)
+++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java Mon Jul  7 23:44:12 2008
@@ -20,7 +20,7 @@
 package org.ofbiz.catalina.container;
 
 import org.apache.tomcat.util.net.ServerSocketFactory;
-import org.apache.tomcat.util.net.jsse.JSSEFactory;
+import org.apache.tomcat.util.net.jsse.JSSE14SocketFactory;
 import org.apache.tomcat.util.net.jsse.JSSEImplementation;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.SSLUtil;
@@ -44,7 +44,7 @@
 
     public SSLImpl() throws ClassNotFoundException {
         super();
-        this.ssFactory = (new JSSEFactory()).getSocketFactory();
+        this.ssFactory = new ExtTomcatServerSocketFactory();
         this.allow =  new TrustManager[] { new AllowTrustManager() };
         Debug.log("SSLImpl loaded; using custom ServerSocketFactory", module);
     }
@@ -53,6 +53,12 @@
         return ssFactory;
     }
 
+    class ExtTomcatServerSocketFactory extends JSSE14SocketFactory {
+        protected TrustManager[] getTrustManagers(String keystoreType, String algorithm) throws Exception {
+            return allow;
+        }
+    }
+
     class AllowTrustManager implements X509TrustManager {
 
         private TrustManager[] tm;