geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r368393 - in /geronimo/trunk/modules/tomcat: ./ src/java/org/apache/geronimo/tomcat/ src/plan/
Date Thu, 12 Jan 2006 15:49:22 GMT
Author: jgenender
Date: Thu Jan 12 07:49:16 2006
New Revision: 368393

URL: http://svn.apache.org/viewcvs?rev=368393&view=rev
Log:
Backed out to 368343 to remove hard coded clustering configuration

Modified:
    geronimo/trunk/modules/tomcat/project.properties
    geronimo/trunk/modules/tomcat/project.xml
    geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
    geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java
    geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContext.java
    geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
    geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml

Modified: geronimo/trunk/modules/tomcat/project.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/project.properties?rev=368393&r1=368392&r2=368393&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/project.properties (original)
+++ geronimo/trunk/modules/tomcat/project.properties Thu Jan 12 07:49:16 2006
@@ -2,8 +2,5 @@
 ## $Rev$ $Date$
 ##
 
-maven.junit.jvmargs=-Djava.endorsed.dirs=${maven.build.dir}/endorsed -ea
+maven.junit.jvmargs=-Djava.endorsed.dirs=${maven.build.dir}/endorsed -ea 
 maven.junit.fork=true
-
-## for WADI - temporary
-axion_version=1.0-M3-dev

Modified: geronimo/trunk/modules/tomcat/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/project.xml?rev=368393&r1=368392&r2=368393&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/project.xml (original)
+++ geronimo/trunk/modules/tomcat/project.xml Thu Jan 12 07:49:16 2006
@@ -189,27 +189,6 @@
              </properties>
         </dependency>
         <dependency>
-            <groupId>axion</groupId>
-            <artifactId>axion</artifactId>
-            <version>${axion_version}</version>
-        </dependency>
-        <dependency>
-            <groupId>backport-util-concurrent</groupId>
-            <artifactId>backport-util-concurrent</artifactId>
-            <version>${backport_util_concurrent_version}</version>
-            <properties>
-                 <geronimo.dependency>true</geronimo.dependency>
-             </properties>
-        </dependency>
-        <dependency>
-            <groupId>activemq</groupId>
-            <artifactId>activemq</artifactId>
-            <version>${activemq_version}</version>
-            <properties>
-                 <geronimo.dependency>true</geronimo.dependency>
-             </properties>
-        </dependency>
-        <dependency>
             <groupId>springframework</groupId>
             <artifactId>spring</artifactId>
             <version>${wadi_spring_version}</version>

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java?rev=368393&r1=368392&r2=368393&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
(original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
Thu Jan 12 07:49:16 2006
@@ -27,10 +27,7 @@
 import javax.servlet.ServletException;
 
 import org.apache.catalina.Container;
-import org.apache.catalina.Lifecycle;
-import org.apache.catalina.LifecycleEvent;
 import org.apache.catalina.LifecycleException;
-import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.Manager;
 import org.apache.catalina.Valve;
 import org.apache.catalina.Wrapper;
@@ -64,7 +61,7 @@
 import org.apache.geronimo.webservices.WebServiceContainerInvoker;
 
 
-public class GeronimoStandardContext extends StandardContext implements LifecycleListener
{
+public class GeronimoStandardContext extends StandardContext {
 
     private static final Log log = LogFactory.getLog(GeronimoStandardContext.class);
 
@@ -76,10 +73,6 @@
 
     private boolean pipelineInitialized;
 
-  private String localSessionManager;
-  private String distributableSessionManager;
-  private ClassLoader webClassLoader;
-
     public void setContextProperties(TomcatContext ctx) throws DeploymentException {
         // Create ReadOnlyContext
         javax.naming.Context enc = null;
@@ -163,43 +156,25 @@
         if (cluster != null)
             this.setCluster(cluster);
         
+        Manager manager = ctx.getManager();
+        if (manager != null)
+            this.setManager(manager);
+
         pipelineInitialized = true;
         this.webServiceMap = ctx.getWebServices();
 
         this.setCrossContext(ctx.isCrossContext());
-
-	this.localSessionManager=ctx.getLocalSessionManager();
-	this.distributableSessionManager=ctx.getDistributableSessionManager();
-	this.webClassLoader=ctx.getWebClassLoader();
-    }
-
-    public void lifecycleEvent(LifecycleEvent event) {
-      if (event.getType()==Lifecycle.START_EVENT) {
-	try {
-	  String sessionManager=getDistributable()?distributableSessionManager:localSessionManager;
-	  if (sessionManager!=null) {
-	    //	    Class clazz=Thread.currentThread().getContextClassLoader().loadClass(sessionManager);
-	    Class clazz=webClassLoader.loadClass(sessionManager);
-	    log.info("Session Manager is:" + clazz.getName());
-	    setManager((Manager)clazz.newInstance());
-	  }
-	} catch (Exception e) {
-	  log.error("unexpected problem instantiating Session Manager", e);
-	}
-      }
     }
 
     public synchronized void start() throws LifecycleException {
         if (pipelineInitialized) {
             try {
-	        addLifecycleListener(this);
                 Valve valve = getFirst();
                 valve.invoke(null, null);
                 //Install the DefaultSubjectValve after the authentication valve so the default
subject is supplied
                 //only if no real subject is authenticated.
                 Valve defaultSubjectValve = new DefaultSubjectValve(defaultSubject);
                 addValve(defaultSubjectValve);
-		removeLifecycleListener(this);
             } catch (IOException e) {
                 if (e.getCause() instanceof LifecycleException) {
                     throw (LifecycleException) e.getCause();

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java?rev=368393&r1=368392&r2=368393&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java
(original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java
Thu Jan 12 07:49:16 2006
@@ -76,10 +76,6 @@
      **/
     private ClassLoader classLoader;
 
-  private String _localSessionManager;
-  private String _distributableSessionManager="org.codehaus.wadi.tomcat55.TomcatManager";;
-
-
     private final Map webServices = new HashMap();
     private final String objectName;
 
@@ -385,22 +381,6 @@
         return new TomcatClassLoader((URL[])urls.toArray(new URL[0]), null, cl, false);
     }
 
-  public String getLocalSessionManager() {
-    return _localSessionManager;
-  }
-
-  public void setLocalSessionManager(String localSessionManager) {
-    _localSessionManager=localSessionManager;
-  }
-
-  public String getDistributableSessionManager() {
-    return _distributableSessionManager;
-  }
-
-  public void setDistributableSessionManager(String distributableSessionManager) {
-    _distributableSessionManager=distributableSessionManager;
-  }    
-
     public static final GBeanInfo GBEAN_INFO;
 
     static {
@@ -426,9 +406,6 @@
 
         infoFactory.addInterface(SoapHandler.class);
         infoFactory.addInterface(TomcatWebContainer.class);
-
-        infoFactory.addAttribute("localSessionManager", String.class, true);
-        infoFactory.addAttribute("distributableSessionManager", String.class, true);
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContext.java?rev=368393&r1=368392&r2=368393&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContext.java (original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContext.java Thu
Jan 12 07:49:16 2006
@@ -66,8 +66,7 @@
     
     public CatalinaCluster getCluster();
     
-    public String getLocalSessionManager();
-    public String getDistributableSessionManager();
+    public Manager getManager();
     
     public boolean isCrossContext();
     

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java?rev=368393&r1=368392&r2=368393&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
(original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
Thu Jan 12 07:49:16 2006
@@ -47,6 +47,7 @@
 import org.apache.geronimo.management.geronimo.WebModule;
 import org.apache.geronimo.security.jacc.RoleDesignateSource;
 import org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean;
+import org.apache.geronimo.tomcat.cluster.WADIGBean;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
 import org.apache.geronimo.transaction.TrackedConnectionAssociator;
 import org.apache.geronimo.transaction.context.OnlineUserTransaction;
@@ -81,7 +82,7 @@
     
     private final CatalinaCluster catalinaCluster;
     
-    private Manager manager=null;
+    private final Manager manager;
 
     private final boolean crossContext;
 
@@ -111,9 +112,6 @@
 
     private final String originalSpecDD;
 
-  private final String localSessionManager;
-  private final String distributableSessionManager;
-
     public TomcatWebAppContext(
             ClassLoader classLoader,
             String objectName,
@@ -135,6 +133,7 @@
             ObjectRetriever tomcatRealm,
             ValveGBean tomcatValveChain,
             CatalinaClusterGBean cluster,
+            WADIGBean manager,
             boolean crossContext,
             Map webServices,
             J2EEServer server,
@@ -162,8 +161,6 @@
         }
         this.webAppRoot = root.resolve(relativeWebAppRoot);
         this.container = container;
-	this.localSessionManager=container.getLocalSessionManager();
-	this.distributableSessionManager=container.getDistributableSessionManager();
         this.originalSpecDD = originalSpecDD;
 
         this.setDocBase(this.webAppRoot.getPath());
@@ -208,7 +205,11 @@
         else
             catalinaCluster = null;
 
-        //Add the manager - now instantiated lazily...
+        //Add the manager
+        if (manager != null)
+           this.manager = (Manager)manager.getInternalObject(); 
+        else
+            this.manager = null;
 
         this.crossContext = crossContext;
 
@@ -336,6 +337,10 @@
         return catalinaCluster;
     }
     
+    public Manager getManager() {
+        return manager;
+    }
+    
     public boolean isCrossContext() {
         return crossContext;
     }
@@ -424,14 +429,6 @@
         log.warn("TomcatWebAppContext failed");
     }
 
-  public String getLocalSessionManager() {
-    return localSessionManager;
-  }
-
-  public String getDistributableSessionManager() {
-    return distributableSessionManager;
-  }
-
     public static final GBeanInfo GBEAN_INFO;
 
     static {
@@ -461,6 +458,7 @@
         infoBuilder.addReference("TomcatRealm", ObjectRetriever.class);
         infoBuilder.addReference("TomcatValveChain", ValveGBean.class);
         infoBuilder.addReference("Cluster", CatalinaClusterGBean.class, CatalinaClusterGBean.J2EE_TYPE);
+        infoBuilder.addReference("Manager", WADIGBean.class);
         infoBuilder.addAttribute("crossContext", boolean.class, true);
         infoBuilder.addAttribute("webServices", Map.class, true);
         infoBuilder.addReference("J2EEServer", J2EEServer.class);
@@ -490,6 +488,7 @@
                 "TomcatRealm",
                 "TomcatValveChain",
                 "Cluster",
+                "Manager",
                 "crossContext",
                 "webServices",
                 "J2EEServer",

Modified: geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml?rev=368393&r1=368392&r2=368393&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml (original)
+++ geronimo/trunk/modules/tomcat/src/plan/tomcat-plan.xml Thu Jan 12 07:49:16 2006
@@ -88,8 +88,6 @@
     <gbean gbeanName="geronimo.server:type=WebContainer,container=Tomcat" class="org.apache.geronimo.tomcat.TomcatContainer">
         <attribute name="catalinaHome">var/catalina</attribute>
         <attribute name="port">8090</attribute>
-        <!--<attribute name="localSessionManager">TODO</attribute>-->
-        <attribute name="distributableSessionManager">org.codehaus.wadi.tomcat55.TomcatManager</attribute>
         <reference name="ServerInfo"><gbean-name>geronimo.system:role=ServerInfo</gbean-name></reference>
     </gbean>
     <gbean gbeanName="geronimo.server:type=WebConnector,container=Tomcat,port=8090" class="org.apache.geronimo.tomcat.connector.HTTPConnector">



Mime
View raw message