geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1003341 - in /geronimo/server/trunk/plugins/tomcat: geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/ geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/ geronimo-tomcat7/src/test/java/org/apache/geronimo...
Date Fri, 01 Oct 2010 00:43:49 GMT
Author: djencks
Date: Fri Oct  1 00:43:49 2010
New Revision: 1003341

URL: http://svn.apache.org/viewvc?rev=1003341&view=rev
Log:
GERONIMO-5624 more info tree for tomcat

Modified:
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BaseGeronimoContextConfig.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=1003341&r1=1003340&r2=1003341&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Fri Oct  1 00:43:49 2010
@@ -473,11 +473,6 @@ public class TomcatModuleBuilder extends
                 webModuleData.setReferencePattern("Container", tomcatContainerName);
             }
 
-            //get Tomcat display-name
-            if (webApp.getDisplayNames().length > 0) {
-                webModuleData.setAttribute("displayName", webApp.getDisplayName());
-            }
-
             // Process the Tomcat container-config elements
             if (tomcatWebApp.isSetHost()) {
                 String virtualServer = tomcatWebApp.getHost().trim();
@@ -584,9 +579,6 @@ public class TomcatModuleBuilder extends
 
             webModuleData.setAttribute("contextAttributes", contextAttributes);
 
-//            Collection<String> listeners = new ArrayList<String>();
-//            webModuleData.setAttribute("listenerClassNames", listeners);
-
             //Handle the role permissions and webservices on the servlets.
             List<org.apache.openejb.jee.Servlet> servletTypes = webApp.getServlet();
             Map<String, AbstractName> webServices = new HashMap<String, AbstractName>();

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BaseGeronimoContextConfig.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BaseGeronimoContextConfig.java?rev=1003341&r1=1003340&r2=1003341&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BaseGeronimoContextConfig.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BaseGeronimoContextConfig.java
Fri Oct  1 00:43:49 2010
@@ -31,6 +31,7 @@ import javax.security.auth.message.confi
 import javax.security.auth.message.config.RegistrationListener;
 import javax.security.auth.message.config.ServerAuthConfig;
 import javax.servlet.ServletContext;
+import javax.servlet.SessionCookieConfig;
 
 import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.deploy.ErrorPage;
@@ -59,6 +60,7 @@ import org.apache.geronimo.tomcat.securi
 import org.apache.geronimo.web.assembler.Assembler;
 import org.apache.geronimo.web.info.ErrorPageInfo;
 import org.apache.geronimo.web.info.LoginConfigInfo;
+import org.apache.geronimo.web.info.SessionConfigInfo;
 import org.apache.geronimo.web.info.WebAppInfo;
 import org.xml.sax.InputSource;
 
@@ -88,6 +90,7 @@ public abstract class BaseGeronimoContex
         Assembler assembler = new Assembler();
         assembler.assemble(servletContext, webAppInfo);
         context.setDisplayName(webAppInfo.displayName);
+        context.setDistributable(webAppInfo.distributable);
         for (ErrorPageInfo errorPageInfo: webAppInfo.errorPages) {
             ErrorPage errorPage = new ErrorPage();
             errorPage.setLocation(errorPageInfo.location);
@@ -108,6 +111,23 @@ public abstract class BaseGeronimoContex
             context.addWelcomeFile(welcomeFile);
         }
         authenticatorConfig(webAppInfo.loginConfig);
+        if (webAppInfo.sessionConfig != null) {
+            SessionConfigInfo sessionConfig = webAppInfo.sessionConfig;
+            context.setSessionTimeout(sessionConfig.sessionTimeoutMinutes);
+            if (sessionConfig.sessionTrackingModes != null) {
+                servletContext.setSessionTrackingModes(sessionConfig.sessionTrackingModes);
+            }
+            if (sessionConfig.sessionCookieConfig != null) {
+                SessionCookieConfig sessionCookieConfig = servletContext.getSessionCookieConfig();
+                sessionCookieConfig.setName(sessionConfig.sessionCookieConfig.name);
+                sessionCookieConfig.setComment(sessionConfig.sessionCookieConfig.comment);
+                sessionCookieConfig.setDomain(sessionConfig.sessionCookieConfig.domain);
+                sessionCookieConfig.setHttpOnly(sessionConfig.sessionCookieConfig.httpOnly);
+                sessionCookieConfig.setMaxAge(sessionConfig.sessionCookieConfig.maxAge);
+                sessionCookieConfig.setPath(sessionConfig.sessionCookieConfig.path);
+                sessionCookieConfig.setSecure(sessionConfig.sessionCookieConfig.secure);
+            }
+        }
         context.setConfigured(true);
     }
 

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java?rev=1003341&r1=1003340&r2=1003341&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
Fri Oct  1 00:43:49 2010
@@ -116,8 +116,6 @@ public class TomcatWebAppContext impleme
     private final String modulePath;
     private final Holder holder;
     private final RuntimeCustomizer contextCustomizer;
-    private final Collection<String> listeners;
-    private String displayName;
     private Map<String, Object> deploymentAttributes;
     private ApplicationPolicyConfigurationManager applicationPolicyConfigurationManager;
     private Map<String,String> contextAttributes;
@@ -155,7 +153,6 @@ public class TomcatWebAppContext impleme
             @ParamReference(name = "LifecycleListenerChain") LifecycleListenerGBean lifecycleListenerChain,
             @ParamReference(name = "Cluster") CatalinaClusterGBean cluster,
             @ParamReference(name = GBEAN_REF_MANAGER_RETRIEVER) ObjectRetriever managerRetriever,
-            @ParamAttribute(name = "displayName") String displayName,
             @ParamAttribute(name = "webServices") Map<String, AbstractName> webServices,
             @ParamAttribute(name = "holder") Holder holder,
             @ParamReference(name = "ContextCustomizer") RuntimeCustomizer contextCustomizer,
@@ -163,7 +160,6 @@ public class TomcatWebAppContext impleme
             @ParamReference(name = "J2EEApplication") J2EEApplication application,
             @ParamReference(name = "ContextSource") ContextSource contextSource,
             @ParamReference(name = "applicationPolicyConfigurationManager") ApplicationPolicyConfigurationManager
applicationPolicyConfigurationManager,
-            @ParamAttribute(name = "listenerClassNames") Collection<String> listenerClassNames,
             @ParamAttribute(name = "deploymentAttributes") Map<String, Object> deploymentAttributes,
             @ParamAttribute(name = "webAppInfo") WebAppInfo webAppInfo,
             @ParamAttribute(name = "contextAttributes") Map<String, String> contextAttributes,
@@ -231,9 +227,6 @@ public class TomcatWebAppContext impleme
             realm = null;
         }
 
-        this.displayName = displayName;
-        this.listeners = listenerClassNames;
-
         //Add the valve list
         if (tomcatValveChain != null) {
             ArrayList<Valve> chain = new ArrayList<Valve>();
@@ -477,15 +470,11 @@ public class TomcatWebAppContext impleme
     }
 
     public Collection<String> getListeners() {
-        return listeners;
+        return Collections.unmodifiableCollection(webAppInfo.listeners);
     }
 
     public String getDisplayName() {
-        return displayName;
-    }
-
-    public void setDisplayName(String displayName) {
-        this.displayName = displayName;
+        return webAppInfo.displayName;
     }
 
     public Object getDeploymentAttribute(String name) {

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java?rev=1003341&r1=1003340&r2=1003341&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
Fri Oct  1 00:43:49 2010
@@ -127,7 +127,7 @@ public abstract class AbstractWebModuleT
                 null,   //lifecycleListenerChain
                 null,   //cluster
                 null,   //managerRetriever
-                null,   //displayName
+                //displayName
                 null,   //webServices
                 null,   //holder
                 null,   //contextCustomizer
@@ -135,7 +135,7 @@ public abstract class AbstractWebModuleT
                 null,   //application
                 contextSource,  //contextSource
                 (ApplicationPolicyConfigurationManager)runAsSource,   //applicationPolicyConfigurationManager
-                null,   //listenerClassNames
+                //listenerClassNames
                 deploymentAttributes, //Map<String, String> deploymentAttributes
                 webAppInfo, //webAppinfo
                 new HashMap<String, String>(), // Map<String,String> contextAttributes;



Mime
View raw message