geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r355002 - in /geronimo/trunk/modules: jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java jetty/project.xml jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
Date Thu, 08 Dec 2005 06:25:36 GMT
Author: janb
Date: Wed Dec  7 22:25:22 2005
New Revision: 355002

URL: http://svn.apache.org/viewcvs?rev=355002&view=rev
Log:
support for wadi

Modified:
    geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/trunk/modules/jetty/project.xml
    geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java

Modified: geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=355002&r1=355001&r2=355002&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Wed Dec  7 22:25:22 2005
@@ -479,6 +479,9 @@
             }
             webModuleData.setAttribute("virtualHosts", hosts);
 
+            //session manager
+            webModuleData.setAttribute("sessionManager", jettyWebApp.getSessionManager());
+            
             //Add dependencies on managed connection factories and ejbs in this app
             //This is overkill, but allows for people not using java:comp context (even though
we don't support it)
             //and sidesteps the problem of circular references between ejbs.

Modified: geronimo/trunk/modules/jetty/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/project.xml?rev=355002&r1=355001&r2=355002&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/project.xml (original)
+++ geronimo/trunk/modules/jetty/project.xml Wed Dec  7 22:25:22 2005
@@ -240,7 +240,31 @@
                  <geronimo.dependency>true</geronimo.dependency>
              </properties>
         </dependency>
-
+        <dependency>
+            <groupId>springframework</groupId>
+            <artifactId>spring</artifactId>
+            <version>${wadi_spring_version}</version>
+            <url>http://www.springframework.org/</url>
+            <properties>
+                 <geronimo.dependency>true</geronimo.dependency>
+             </properties>
+        </dependency>
+        <dependency>
+            <groupId>wadi</groupId>
+            <artifactId>wadi-core</artifactId>
+            <version>${wadi_version}</version>
+            <properties>
+                 <geronimo.dependency>true</geronimo.dependency>
+             </properties>
+        </dependency>
+        <dependency>
+            <groupId>wadi</groupId>
+            <artifactId>wadi-jetty5</artifactId>
+            <version>${wadi_version}</version>
+            <properties>
+                 <geronimo.dependency>true</geronimo.dependency>
+             </properties>
+        </dependency>
     </dependencies>
 
 

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=355002&r1=355001&r2=355002&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
Wed Dec  7 22:25:22 2005
@@ -71,6 +71,7 @@
 import org.mortbay.jetty.servlet.FilterHolder;
 import org.mortbay.jetty.servlet.JSR154Filter;
 import org.mortbay.jetty.servlet.ServletHolder;
+import org.mortbay.jetty.servlet.SessionManager;
 import org.mortbay.jetty.servlet.WebApplicationContext;
 import org.mortbay.jetty.servlet.WebApplicationHandler;
 
@@ -104,6 +105,8 @@
 
     private final String objectName;
 
+    private String sessionManager;
+
     /**
      * @deprecated never use this... this is only here because Jetty WebApplicationContext
is externalizable
      */
@@ -122,13 +125,14 @@
         securityInterceptor = null;
         welcomeFiles = null;
         objectName = null;
-
+        sessionManager = null;
     }
 
     public JettyWebAppContext(String objectName,
                               String originalSpecDD,
                               URI uri,
                               String[] virtualHosts,
+                              String sessionManager,
                               Map componentContext,
                               OnlineUserTransaction userTransaction,
                               ClassLoader classLoader,
@@ -209,6 +213,7 @@
         setClassLoader(this.webClassLoader);
 
         setHosts(virtualHosts);
+        this.sessionManager = sessionManager;
         handler = new WebApplicationHandler();
         addHandler(handler);
 
@@ -273,6 +278,21 @@
         handler.addFilterHolder(jsr154FilterHolder);
         jsr154FilterHolder.setInitParameter("unwrappedDispatch", "true");
         handler.addFilterPathMapping("/*", "jsr154", Dispatcher.__REQUEST | Dispatcher.__FORWARD
| Dispatcher.__INCLUDE | Dispatcher.__ERROR);
+
+        //setup a SessionManager
+        if (getSessionManager()!=null) {
+        	Class clazz = Thread.currentThread().getContextClassLoader().loadClass(getSessionManager());
+          Object o = clazz.newInstance();
+
+        	System.out.println("created object class="+getSessionManager());
+System.out.println (o.getClass().getName());
+        		Class[] ifs = o.getClass().getInterfaces();
+        		for (int i=0;i<ifs.length;i++)
+        			System.out.println ("implements: "+ifs[i].getName());
+
+        	getServletHandler().setSessionManager((SessionManager)o);
+        }
+
     }
 
     public String getObjectName() {
@@ -468,6 +488,12 @@
         }
     }
 
+
+    public String getSessionManager(){
+    	return this.sessionManager;
+    }
+
+
     /**
      * ObjectName must match this pattern:
      * <p/>
@@ -523,6 +549,7 @@
     }
 
 
+
     public static final GBeanInfo GBEAN_INFO;
 
     static {
@@ -547,6 +574,7 @@
 
         infoBuilder.addAttribute("uri", URI.class, true);
         infoBuilder.addAttribute("virtualHosts", String[].class, true);
+        infoBuilder.addAttribute("sessionManager", String.class, true);
         infoBuilder.addAttribute("componentContext", Map.class, true);
         infoBuilder.addAttribute("userTransaction", OnlineUserTransaction.class, true);
         infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
@@ -589,6 +617,7 @@
             "deploymentDescriptor",
             "uri",
             "virtualHosts",
+            "sessionManager",
             "componentContext",
             "userTransaction",
             "classLoader",



Mime
View raw message