geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r358146 - /geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
Date Tue, 20 Dec 2005 23:38:37 GMT
Author: janb
Date: Tue Dec 20 15:38:21 2005
New Revision: 358146

URL: http://svn.apache.org/viewcvs?rev=358146&view=rev
Log:
added the very important line to call setConfigurationClassNames() which will actually do
the
setting up of the (wadi) SessionManager

Modified:
    geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java?rev=358146&r1=358145&r2=358146&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
(original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
Tue Dec 20 15:38:21 2005
@@ -108,12 +108,16 @@
     private String sessionManager;
 
     
-    public class SessionManagerConfiguration implements WebApplicationContext.Configuration
{
+    public static class SessionManagerConfiguration implements WebApplicationContext.Configuration
{
 
     	private WebApplicationContext webAppContext;
     	
+        
     	
-		public void setWebApplicationContext(WebApplicationContext webAppContext) {
+		public SessionManagerConfiguration() {
+        }
+
+        public void setWebApplicationContext(WebApplicationContext webAppContext) {
 			this.webAppContext = webAppContext;
 		}
 
@@ -129,12 +133,15 @@
 
 	
 		public void configureWebApp() throws Exception {
-		       //setup a SessionManager
-	        if (getSessionManager() != null) {
-	        	Class clazz = Thread.currentThread().getContextClassLoader().loadClass(getSessionManager());
-	          Object o = clazz.newInstance();
-	        	this.webAppContext.getServletHandler().setSessionManager((SessionManager)o);
-	        }
+		    //setup a SessionManager
+            log.debug("About to configure a SessionManager");
+            String sessionManagerClassName = ((JettyWebAppContext)webAppContext).getSessionManager();
+		    if (sessionManagerClassName != null) {
+		        Class clazz = Thread.currentThread().getContextClassLoader().loadClass(sessionManagerClassName);
+		        Object o = clazz.newInstance();
+                log.debug("Setting SessionManager type="+clazz.getName()+" instance="+o);
+		        this.webAppContext.getServletHandler().setSessionManager((SessionManager)o);
+		    }
 		}
     	
     }
@@ -519,6 +526,7 @@
 
     private void configureSessionManager (String sessionManagerClassName) {
     	  this.sessionManager = sessionManagerClassName;
+          log.debug("SessionManager classname="+sessionManagerClassName);
           if (this.sessionManager != null) {
         	  addConfiguration (SessionManagerConfiguration.class.getName());
           }
@@ -531,6 +539,10 @@
         	  newConfigClassNames[i] = configClassNames[i];
           
           newConfigClassNames[newConfigClassNames.length-1] = configClassName;
+          setConfigurationClassNames(newConfigClassNames);
+          log.debug("Configs:");
+          for (int i=0; i<newConfigClassNames.length;i++)
+              log.debug(newConfigClassNames[i]+" ");
     }
     
     /**



Mime
View raw message