geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r789622 [1/2] - in /geronimo/server/trunk/plugins/jetty7: geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/ geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/ ge...
Date Tue, 30 Jun 2009 08:51:32 GMT
Author: djencks
Date: Tue Jun 30 08:51:31 2009
New Revision: 789622

URL: http://svn.apache.org/viewvc?rev=789622&view=rev
Log:
GERONIMO-4645 reimplement ejb web service security. Also GERONIMO-4689 clean up code by renaming and moving classes.

Added:
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/DefaultServletHolderWrapper.java   (contents, props changed)
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyDefaultServletHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java   (contents, props changed)
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java   (contents, props changed)
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InternalJettyServletHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JspServletHolderWrapper.java   (contents, props changed)
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyJspServletHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/POJOWebServiceHolderWrapper.java   (contents, props changed)
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyPOJOWebServiceHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/ServletHolderWrapper.java   (contents, props changed)
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyServletHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java   (contents, props changed)
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBServletHandler.java   (with props)
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceContext.java   (contents, props changed)
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyEJBWebServiceContext.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceSecurityHandler.java   (with props)
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/GeronimoWebAppContext.java   (contents, props changed)
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/TwistyWebAppContext.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InjectionServletHandler.java
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InjectionServletHandler.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/JaccSecurityHandler.java   (contents, props changed)
      - copied, changed from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/JettySecurityHandler.java
Removed:
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InjectionServletHandler.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InternalJettyServletHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyDefaultServletHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyEJBWebServiceContext.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyJspServletHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyPOJOWebServiceHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyServletHolder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/JettySecurityHandler.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/TwistyWebAppContext.java
Modified:
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/JettyModuleBuilder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/pom.xml
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyContainerImpl.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/security/AuthConfigProviderHandlerFactory.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/security/JettySecurityHandlerFactory.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/security/SecurityHandlerFactory.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/AbstractWebModuleTest.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/ApplicationTest.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/GBeanInfoTest.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/SecurityTest.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/StatTest.java
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/test/java/org/apache/geronimo/jetty7/security/ServerAuthenticationGBean.java
    geronimo/server/trunk/plugins/jetty7/jetty7-deployer/src/main/plan/plan.xml

Modified: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/JettyModuleBuilder.java?rev=789622&r1=789621&r2=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/JettyModuleBuilder.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-builder/src/main/java/org/apache/geronimo/jetty7/deployment/JettyModuleBuilder.java Tue Jun 30 08:51:31 2009
@@ -78,12 +78,12 @@
 import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedWebApp;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.jetty7.Host;
-import org.apache.geronimo.jetty7.JettyDefaultServletHolder;
-import org.apache.geronimo.jetty7.JettyFilterHolder;
+import org.apache.geronimo.jetty7.DefaultServletHolderWrapper;
+import org.apache.geronimo.jetty7.FilterHolderWrapper;
 import org.apache.geronimo.jetty7.JettyFilterMapping;
-import org.apache.geronimo.jetty7.JettyJspServletHolder;
-import org.apache.geronimo.jetty7.JettyServletHolder;
-import org.apache.geronimo.jetty7.JettyWebAppContext;
+import org.apache.geronimo.jetty7.JspServletHolderWrapper;
+import org.apache.geronimo.jetty7.ServletHolderWrapper;
+import org.apache.geronimo.jetty7.WebAppContextWrapper;
 import org.apache.geronimo.jetty7.security.AuthConfigProviderHandlerFactory;
 import org.apache.geronimo.jetty7.security.BuiltInAuthMethod;
 import org.apache.geronimo.jetty7.security.JettySecurityHandlerFactory;
@@ -169,7 +169,7 @@
 
     private final Environment defaultEnvironment;
     private final AbstractNameQuery jettyContainerObjectName;
-    private final JettyJspServletHolder jspServlet;
+    private final JspServletHolderWrapper jspServlet;
     private final Collection defaultServlets;
     private final Collection defaultFilters;
     private final Collection defaultFilterMappings;
@@ -188,7 +188,7 @@
                               Integer defaultSessionTimeoutSeconds,
                               List<String> defaultWelcomeFiles,
                               AbstractNameQuery jettyContainerName,
-                              JettyJspServletHolder jspServlet,
+                              JspServletHolderWrapper jspServlet,
                               Collection defaultServlets,
                               Collection defaultFilters,
                               Collection defaultFilterMappings,
@@ -393,7 +393,7 @@
 
         WebAppType webApp = (WebAppType) webModule.getSpecDD();
         JettyWebAppType jettyWebApp = (JettyWebAppType) webModule.getVendorDD();
-        GBeanData webModuleData = new GBeanData(moduleName, JettyWebAppContext.class);
+        GBeanData webModuleData = new GBeanData(moduleName, WebAppContextWrapper.class);
 
         configureBasicWebModuleAttributes(webApp, jettyWebApp, moduleContext, earContext, webModule, webModuleData);
 
@@ -440,7 +440,7 @@
             // configure listeners.
             configureListeners(webApp, webModuleData);
 
-            webModuleData.setAttribute(JettyWebAppContext.GBEAN_ATTR_SESSION_TIMEOUT,
+            webModuleData.setAttribute(WebAppContextWrapper.GBEAN_ATTR_SESSION_TIMEOUT,
                     (webApp.getSessionConfigArray().length == 1 && webApp.getSessionConfigArray(0).getSessionTimeout() != null) ?
                             webApp.getSessionConfigArray(0).getSessionTimeout().getBigIntegerValue().intValue() * 60 :
                             defaultSessionTimeoutSeconds);
@@ -449,7 +449,7 @@
             webModuleData.setAttribute("distributable", distributable);
             if (TRUE == distributable) {
                 clusteringBuilders.build(jettyWebApp, earContext, moduleContext);
-                if (webModuleData.getReferencePatterns(JettyWebAppContext.GBEAN_REF_SESSION_HANDLER_FACTORY) == null) {
+                if (webModuleData.getReferencePatterns(WebAppContextWrapper.GBEAN_REF_SESSION_HANDLER_FACTORY) == null) {
                     log.warn("No clustering builders configured: app will not be clustered");
                     configureNoClustering(moduleContext, webModuleData);
                 }
@@ -573,7 +573,7 @@
 //                "DefaultWebApplicationHandlerFactory",
 //                NameFactory.GERONIMO_SERVICE);
 //        GBeanData beanData = new GBeanData(name, DefaultWebApplicationHandlerFactory.GBEAN_INFO);
-//        webModuleData.setReferencePattern(JettyWebAppContext.GBEAN_REF_WEB_APPLICATION_HANDLER_FACTORY, name);
+//        webModuleData.setReferencePattern(WebAppContextWrapper.GBEAN_REF_WEB_APPLICATION_HANDLER_FACTORY, name);
 //        moduleContext.addGBean(beanData);
     }
 
@@ -622,7 +622,7 @@
         for (FilterType filterType : filterArray) {
             String filterName = filterType.getFilterName().getStringValue().trim();
             AbstractName filterAbstractName = earContext.getNaming().createChildName(moduleName, filterName, NameFactory.WEB_FILTER);
-            GBeanData filterData = new GBeanData(filterAbstractName, JettyFilterHolder.GBEAN_INFO);
+            GBeanData filterData = new GBeanData(filterAbstractName, FilterHolderWrapper.GBEAN_INFO);
             filterData.setAttribute("filterName", filterName);
             filterData.setAttribute("filterClass", filterType.getFilterClass().getStringValue().trim());
             Map<String, String> initParams = new HashMap<String, String>();
@@ -1101,7 +1101,7 @@
                 throw new DeploymentException("Could not load javax.servlet.Servlet in web classloader", e); // TODO identify web app in message
             }
             if (baseServletClass.isAssignableFrom(servletClass)) {
-                servletData = new GBeanData(servletAbstractName, JettyServletHolder.class);
+                servletData = new GBeanData(servletAbstractName, ServletHolderWrapper.class);
                 servletData.setAttribute("servletClass", servletClassName);
             } else {
                 servletData = new GBeanData(pojoWebServiceTemplate);
@@ -1124,7 +1124,7 @@
                 }
             }
         } else if (servletType.isSetJspFile()) {
-            servletData = new GBeanData(servletAbstractName, JettyServletHolder.class);
+            servletData = new GBeanData(servletAbstractName, ServletHolderWrapper.class);
             servletData.setAttribute("jspFile", servletType.getJspFile().getStringValue().trim());
             servletData.setAttribute("servletClass", jspServlet.getServletClassName());
             initParams.put("development", "false");
@@ -1179,8 +1179,8 @@
         infoBuilder.addAttribute("defaultLocaleEncodingMappings", Map.class, true, true);
         infoBuilder.addAttribute("defaultMimeTypeMappings", Map.class, true, true);
         infoBuilder.addAttribute("jettyContainerObjectName", AbstractNameQuery.class, true, true);
-        infoBuilder.addReference("JspServlet", JettyJspServletHolder.class, NameFactory.SERVLET_TEMPLATE);
-        infoBuilder.addReference("DefaultServlets", JettyDefaultServletHolder.class, NameFactory.SERVLET_TEMPLATE);
+        infoBuilder.addReference("JspServlet", JspServletHolderWrapper.class, NameFactory.SERVLET_TEMPLATE);
+        infoBuilder.addReference("DefaultServlets", DefaultServletHolderWrapper.class, NameFactory.SERVLET_TEMPLATE);
         infoBuilder.addReference("DefaultFilters", Object.class);
         infoBuilder.addReference("DefaultFilterMappings", Object.class);
         infoBuilder.addReference("PojoWebServiceTemplate", Object.class, NameFactory.SERVLET_WEB_SERVICE_TEMPLATE);

Modified: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java?rev=789622&r1=789621&r2=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java Tue Jun 30 08:51:31 2009
@@ -37,7 +37,7 @@
 import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.gbean.annotation.ParamAttribute;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.jetty7.JettyWebAppContext;
+import org.apache.geronimo.jetty7.WebAppContextWrapper;
 import org.apache.geronimo.jetty7.cluster.ClusteredSessionHandlerFactory;
 import org.apache.geronimo.jetty7.cluster.wadi.WADIClusteredPreHandlerFactory;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
@@ -121,7 +121,7 @@
 
     protected GBeanData extractWebModule(DeploymentContext moduleContext) throws DeploymentException {
         Configuration configuration = moduleContext.getConfiguration();
-        AbstractNameQuery webModuleQuery = new AbstractNameQuery(configuration.getId(), Collections.EMPTY_MAP, Collections.singleton(JettyWebAppContext.class.getName()));
+        AbstractNameQuery webModuleQuery = new AbstractNameQuery(configuration.getId(), Collections.EMPTY_MAP, Collections.singleton(WebAppContextWrapper.class.getName()));
         try {
             return configuration.findGBeanData(webModuleQuery);
         } catch (GBeanNotFoundException e) {
@@ -194,7 +194,7 @@
     }
 
     protected Integer getSessionTimeout(GBeanData webModuleData) throws AssertionError {
-        Integer sessionTimeout = (Integer) webModuleData.getAttribute(JettyWebAppContext.GBEAN_ATTR_SESSION_TIMEOUT);
+        Integer sessionTimeout = (Integer) webModuleData.getAttribute(WebAppContextWrapper.GBEAN_ATTR_SESSION_TIMEOUT);
         if (null == sessionTimeout) {
             throw new AssertionError();
         }
@@ -257,7 +257,7 @@
         GBeanData beanData = new GBeanData(name, WADIClusteredPreHandlerFactory.class);
         beanData.setReferencePattern(WADIClusteredPreHandlerFactory.GBEAN_REF_WADI_SESSION_MANAGER, sessionManagerName);
 
-        webModuleData.setReferencePattern(JettyWebAppContext.GBEAN_REF_PRE_HANDLER_FACTORY, name);
+        webModuleData.setReferencePattern(WebAppContextWrapper.GBEAN_REF_PRE_HANDLER_FACTORY, name);
 
         moduleContext.addGBean(beanData);
 
@@ -272,7 +272,7 @@
         GBeanData beanData = new GBeanData(name, ClusteredSessionHandlerFactory.class);
         beanData.setReferencePattern(ClusteredSessionHandlerFactory.GBEAN_REF_SESSION_MANAGER, sessionManagerName);
 
-        webModuleData.setReferencePattern(JettyWebAppContext.GBEAN_REF_SESSION_HANDLER_FACTORY, name);
+        webModuleData.setReferencePattern(WebAppContextWrapper.GBEAN_REF_SESSION_HANDLER_FACTORY, name);
 
         moduleContext.addGBean(beanData);
 

Modified: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/pom.xml?rev=789622&r1=789621&r2=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/pom.xml (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/pom.xml Tue Jun 30 08:51:31 2009
@@ -33,18 +33,13 @@
     <name>Geronimo Plugins, Jetty :: Core</name>
 
     <dependencies>
-        <!--<dependency>-->
-            <!--<groupId>org.apache.geronimo.specs</groupId>-->
-            <!--<artifactId>geronimo-servlet_3.0_spec</artifactId>-->
-            <!--<version>1.0-EA-SNAPSHOT</version>-->
-        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-servlet_2.5_spec</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-ejb_3.0_spec</artifactId>
+            <artifactId>geronimo-jacc_1.1_spec</artifactId>
         </dependency>
 
         <dependency>
@@ -66,12 +61,6 @@
             <artifactId>jee-specs</artifactId>
             <version>${version}</version>
             <type>car</type>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-servlet_2.5_spec</artifactId>
-                </exclusion>
-            </exclusions>
             <scope>provided</scope>
         </dependency>
 
@@ -80,27 +69,9 @@
             <artifactId>webservices-common</artifactId>
             <type>car</type>
             <version>${version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-servlet_2.5_spec</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <!-- xbean-reflect, g-management come via g-j2ee from this -->
-        <!--<dependency>-->
-            <!--<groupId>org.apache.geronimo.modules</groupId>-->
-            <!--<artifactId>geronimo-webservices</artifactId>-->
-            <!--<version>${version}</version>-->
-            <!--<scope>provided</scope>-->
-        <!--</dependency>-->
-         
-        <!--<dependency>-->
-            <!--<groupId>org.eclipse.jetty</groupId>-->
-            <!--<artifactId>jetty-server</artifactId>-->
-        <!--</dependency>-->
-        
+        </dependency>
+
+
         <dependency>
             <groupId>org.eclipse.jetty</groupId>
             <artifactId>jetty-ajp</artifactId>
@@ -111,37 +82,18 @@
             <artifactId>jetty-jaspi</artifactId>
         </dependency>
 
-        <!--<dependency>-->
-            <!--<groupId>org.eclipse.jetty</groupId>-->
-            <!--<artifactId>jetty-util</artifactId>-->
-        <!--</dependency>-->
         <dependency>
             <groupId>org.eclipse.jetty</groupId>
             <artifactId>jetty-webapp</artifactId>
         </dependency>
-        <!--<dependency>-->
-            <!--<groupId>org.eclipse.jetty</groupId>-->
-            <!--<artifactId>jetty-security</artifactId>-->
-        <!--</dependency>-->
-        <!--<dependency>-->
-            <!--<groupId>org.eclipse.jetty</groupId>-->
-            <!--<artifactId>jetty-servlet</artifactId>-->
-        <!--</dependency>-->
-        <!--<dependency>-->
-            <!--<groupId>org.eclipse.jetty</groupId>-->
-            <!--<artifactId>jetty-plus</artifactId>-->
-        <!--</dependency>-->
-
-        <!--<dependency>-->
-            <!--<groupId>xerces</groupId>-->
-            <!--<artifactId>xercesImpl</artifactId>-->
-            <!--<scope>test</scope>-->
-        <!--</dependency>-->
-        <!--<dependency>-->
-            <!--<groupId>org.slf4j</groupId>-->
-            <!--<artifactId>jcl104-over-slf4j</artifactId>-->
-            <!--<scope>test</scope>-->
-        <!--</dependency>-->
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-security</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+        </dependency>
     </dependencies>
     
     <build>

Copied: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/DefaultServletHolderWrapper.java (from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyDefaultServletHolder.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/DefaultServletHolderWrapper.java?p2=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/DefaultServletHolderWrapper.java&p1=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyDefaultServletHolder.java&r1=788556&r2=789622&rev=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyDefaultServletHolder.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/DefaultServletHolderWrapper.java Tue Jun 30 08:51:31 2009
@@ -31,12 +31,12 @@
  * @version $Rev$ $Date$
  */
 @GBean(j2eeType = NameFactory.SERVLET_TEMPLATE)
-public class JettyDefaultServletHolder extends JettyServletHolder {
+public class DefaultServletHolderWrapper extends ServletHolderWrapper {
 
-    public JettyDefaultServletHolder() {
+    public DefaultServletHolderWrapper() {
     }
 
-    public JettyDefaultServletHolder(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
+    public DefaultServletHolderWrapper(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
                                      @ParamAttribute(name = "servletName") String servletName,
                                      @ParamAttribute(name = "servletClass") String servletClassName,
                                      @ParamAttribute(name = "jspFile") String jspFile,

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/DefaultServletHolderWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/DefaultServletHolderWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/DefaultServletHolderWrapper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java (from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterHolder.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java?p2=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java&p1=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterHolder.java&r1=788556&r2=789622&rev=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterHolder.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java Tue Jun 30 08:51:31 2009
@@ -34,11 +34,11 @@
  * @version $Rev$ $Date$
  */
 @GBean(j2eeType = NameFactory.WEB_FILTER)
-public class JettyFilterHolder implements GBeanLifecycle {
+public class FilterHolderWrapper implements GBeanLifecycle {
 
     private final FilterHolder filterHolder;
 
-    public JettyFilterHolder(@ParamAttribute(name = "filterName") String filterName,
+    public FilterHolderWrapper(@ParamAttribute(name = "filterName") String filterName,
                              @ParamAttribute(name = "filterClass") String filterClass,
                              @ParamAttribute(name = "initParams") Map initParams,
                              @ParamReference(name = "JettyServletRegistration", namingType = NameFactory.WEB_MODULE) JettyServletRegistration jettyServletRegistration) throws Exception {
@@ -135,7 +135,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(JettyFilterHolder.class, NameFactory.WEB_FILTER);
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(FilterHolderWrapper.class, NameFactory.WEB_FILTER);
         infoBuilder.addAttribute("filterName", String.class, true);
         infoBuilder.addAttribute("filterClass", String.class, true);
         infoBuilder.addAttribute("initParams", Map.class, true);

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java (from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InternalJettyServletHolder.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java?p2=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java&p1=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InternalJettyServletHolder.java&r1=788556&r2=789622&rev=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/InternalJettyServletHolder.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java Tue Jun 30 08:51:31 2009
@@ -36,13 +36,13 @@
 /**
  * @version $Rev$ $Date$
  */
-public class InternalJettyServletHolder extends ServletHolder {
+public class GeronimoServletHolder extends ServletHolder {
 
     private final IntegrationContext integrationContext;
     private final Subject runAsSubject;
     private final JettyServletRegistration servletRegistration;
 
-    public InternalJettyServletHolder(IntegrationContext integrationContext, Subject runAsSubject, JettyServletRegistration servletRegistration) {
+    public GeronimoServletHolder(IntegrationContext integrationContext, Subject runAsSubject, JettyServletRegistration servletRegistration) {
         this.integrationContext = integrationContext;
         this.runAsSubject = runAsSubject;
         this.servletRegistration = servletRegistration;

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyContainerImpl.java?rev=789622&r1=789621&r2=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyContainerImpl.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyContainerImpl.java Tue Jun 30 08:51:31 2009
@@ -20,8 +20,10 @@
 import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
+import java.security.Permission;
 
 import javax.management.j2ee.statistics.Stats;
+import javax.security.jacc.WebUserDataPermission;
 
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.gbean.annotation.GBean;
@@ -37,6 +39,10 @@
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.webservices.SoapHandler;
 import org.apache.geronimo.webservices.WebServiceContainer;
+import org.apache.geronimo.jetty7.handler.EJBServletHandler;
+import org.apache.geronimo.jetty7.handler.EJBWebServiceContext;
+import org.apache.geronimo.jetty7.security.JettySecurityHandlerFactory;
+import org.apache.geronimo.jetty7.security.BuiltInAuthMethod;
 import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.RequestLog;
@@ -46,6 +52,8 @@
 import org.eclipse.jetty.server.handler.HandlerCollection;
 import org.eclipse.jetty.server.handler.RequestLogHandler;
 import org.eclipse.jetty.server.handler.StatisticsHandler;
+import org.eclipse.jetty.servlet.ServletHandler;
+import org.eclipse.jetty.security.SecurityHandler;
 
 /**
  * @version $Rev$ $Date$
@@ -58,7 +66,7 @@
     private static final String DEFAULT_JETTY_HOME = "var/jetty";
 
     private final Server server;
-    private final Map webServices = new HashMap();
+    private final Map<String, EJBWebServiceContext> webServices = new HashMap<String, EJBWebServiceContext>();
     private final String objectName;
     private final WebManager manager;
     private final String jettyHome;
@@ -67,9 +75,7 @@
     private JettyWebContainerStatsImpl stats;
     // list of handlers
     private StatisticsHandler statsHandler = new StatisticsHandler();
-    private HandlerCollection handlerCollection = new HandlerCollection();
     private ContextHandlerCollection contextHandlerCollection = new ContextHandlerCollection();
-    private DefaultHandler defaultHandler = new DefaultHandler();
     private RequestLogHandler requestLogHandler = new RequestLogHandler();
     //    private boolean statsHandlerInPlace = false;
     private boolean statsOn = false;
@@ -95,7 +101,9 @@
         //handled by a Handler in the ContextHandlerCollection.
         //The third element is the RequestLogHandler, which requires
         //a RequestLog impl to be set.
+        DefaultHandler defaultHandler = new DefaultHandler();
         Handler[] handlers = {contextHandlerCollection, defaultHandler, requestLogHandler, statsHandler};
+        HandlerCollection handlerCollection = new HandlerCollection();
         handlerCollection.setHandlers(handlers);
         server.setHandler(handlerCollection);
 
@@ -211,11 +219,23 @@
         contextHandlerCollection.removeHandler(context);
     }
 
-    ///TODO figure out strings1 param
-    public void addWebService(String contextPath, String[] virtualHosts, WebServiceContainer webServiceContainer, ConfigurationFactory configurationFactory, String realmName, String transportGuarantee, String authMethod, String[] strings1, ClassLoader classLoader) throws Exception {
-//        InternalJAASJettyRealm internalJAASJettyRealm = securityRealmName == null ? null : addRealm(securityRealmName);
-//        JettyEJBWebServiceContext webServiceContext = new JettyEJBWebServiceContext(contextPath, webServiceContainer, internalJAASJettyRealm, realmName, transportGuarantee, authMethod, classLoader);
-        JettyEJBWebServiceContext webServiceContext = new JettyEJBWebServiceContext(contextPath, webServiceContainer, realmName, transportGuarantee, authMethod, classLoader);
+    public void addWebService(String contextPath,
+                              String[] virtualHosts,
+                              WebServiceContainer webServiceContainer,
+                              ConfigurationFactory configurationFactory,
+                              String realmName,
+                              String transportGuarantee,
+                              String authMethod,
+                              String[] protectedMethods, //allowed methods?
+                              ClassLoader classLoader) throws Exception {
+        SecurityHandler securityHandler = null;
+        if (realmName != null) {
+            JettySecurityHandlerFactory  factory = new JettySecurityHandlerFactory(BuiltInAuthMethod.valueOf(authMethod), null, null, realmName, configurationFactory);
+            Permission permission = new WebUserDataPermission("/*", protectedMethods, ":" + transportGuarantee);
+            securityHandler = factory.buildEJBSecurityHandler(permission);
+        }
+        ServletHandler servletHandler = new EJBServletHandler(webServiceContainer);
+        EJBWebServiceContext webServiceContext = new EJBWebServiceContext(contextPath, securityHandler, servletHandler, classLoader);
         webServiceContext.setVirtualHosts(virtualHosts);
         addContext(webServiceContext);
         webServiceContext.start();
@@ -223,7 +243,7 @@
     }
 
     public void removeWebService(String contextPath) {
-        JettyEJBWebServiceContext webServiceContext = (JettyEJBWebServiceContext) webServices.remove(contextPath);
+        EJBWebServiceContext webServiceContext = webServices.remove(contextPath);
         try {
             removeContext(webServiceContext);
         } catch (Exception e) {

Modified: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java?rev=789622&r1=789621&r2=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java Tue Jun 30 08:51:31 2009
@@ -21,8 +21,6 @@
 
 import org.eclipse.jetty.server.DispatcherType;
 
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.ReferenceCollection;
 import org.apache.geronimo.gbean.ReferenceCollectionEvent;
 import org.apache.geronimo.gbean.ReferenceCollectionListener;
@@ -44,7 +42,7 @@
     private final boolean forwardDispatch;
     private final boolean includeDispatch;
     private final boolean errorDispatch;
-    private final JettyFilterHolder jettyFilterHolder;
+    private final FilterHolderWrapper jettyFilterHolder;
     private final Collection<ServletNameSource> jettyServletHolders;
     private final JettyFilterMapping previous;
     private final JettyServletRegistration jettyServletRegistration;
@@ -54,7 +52,7 @@
             @ParamAttribute(name = "forwardDispatch")boolean forwardDispatch,
             @ParamAttribute(name = "includeDispatch")boolean includeDispatch,
             @ParamAttribute(name = "errorDispatch")boolean errorDispatch,
-            @ParamReference(name="Filter", namingType = NameFactory.WEB_FILTER)JettyFilterHolder jettyFilterHolder,
+            @ParamReference(name="Filter", namingType = NameFactory.WEB_FILTER) FilterHolderWrapper jettyFilterHolder,
             @ParamReference(name="Servlets", namingType = NameFactory.SERVLET)Collection<ServletNameSource> jettyServletHolders,
             @ParamReference(name="Previous", namingType = NameFactory.URL_WEB_FILTER_MAPPING)JettyFilterMapping previous,
             @ParamReference(name="JettyServletRegistration", namingType = NameFactory.WEB_MODULE)JettyServletRegistration jettyServletRegistration) {
@@ -149,7 +147,7 @@
         return errorDispatch;
     }
 
-    public JettyFilterHolder getFilter() {
+    public FilterHolderWrapper getFilter() {
         return jettyFilterHolder;
     }
 

Copied: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JspServletHolderWrapper.java (from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyJspServletHolder.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JspServletHolderWrapper.java?p2=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JspServletHolderWrapper.java&p1=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyJspServletHolder.java&r1=788556&r2=789622&rev=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyJspServletHolder.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JspServletHolderWrapper.java Tue Jun 30 08:51:31 2009
@@ -34,12 +34,12 @@
  * @version $Rev$ $Date$
  */
 @GBean(j2eeType = NameFactory.SERVLET_TEMPLATE)
-public class JettyJspServletHolder extends JettyServletHolder {
+public class JspServletHolderWrapper extends ServletHolderWrapper {
 
-    public JettyJspServletHolder() {
+    public JspServletHolderWrapper() {
     }
 
-    public JettyJspServletHolder(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
+    public JspServletHolderWrapper(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
                                  @ParamAttribute(name = "servletName") String servletName,
                                  @ParamAttribute(name = "servletClass") String servletClassName,
                                  @ParamAttribute(name = "jspFile") String jspFile,

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JspServletHolderWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JspServletHolderWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JspServletHolderWrapper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/POJOWebServiceHolderWrapper.java (from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyPOJOWebServiceHolder.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/POJOWebServiceHolderWrapper.java?p2=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/POJOWebServiceHolderWrapper.java&p1=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyPOJOWebServiceHolder.java&r1=788556&r2=789622&rev=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyPOJOWebServiceHolder.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/POJOWebServiceHolderWrapper.java Tue Jun 30 08:51:31 2009
@@ -50,14 +50,14 @@
  */
 
 @GBean(j2eeType = NameFactory.SERVLET_WEB_SERVICE_TEMPLATE)
-public class JettyPOJOWebServiceHolder implements ServletNameSource, GBeanLifecycle {
+public class POJOWebServiceHolderWrapper implements ServletNameSource, GBeanLifecycle {
     private final ServletHolder servletHolder;
     private final WebServiceContainer webServiceContainer;
     private final Set<String> servletMappings;
     private final JettyServletRegistration context;
     private final String pojoClassName;
 
-    public JettyPOJOWebServiceHolder(@ParamAttribute(name = "pojoClassName") String pojoClassName,
+    public POJOWebServiceHolderWrapper(@ParamAttribute(name = "pojoClassName") String pojoClassName,
                                      @ParamAttribute(name = "servletName") String servletName,
                                      @ParamAttribute(name = "initParams") Map<String, String> initParams,
                                      @ParamAttribute(name = "loadOnStartup") Integer loadOnStartup,
@@ -66,7 +66,7 @@
                                      @ParamReference(name = "WebServiceContainerFactory") WebServiceContainerFactory webServiceContainerFactory,
                                      @ParamReference(name = "JettyServletRegistration", namingType = NameFactory.WEB_MODULE) JettyServletRegistration context) throws Exception {
         Subject runAsSubject = context == null ? null : context.getSubjectForRole(runAsRole);
-        servletHolder = new InternalJettyServletHolder(context == null ? null : context.getIntegrationContext(), runAsSubject, context);
+        servletHolder = new GeronimoServletHolder(context == null ? null : context.getIntegrationContext(), runAsSubject, context);
         //context will be null only for use as "default servlet info holder" in deployer.
 
         this.pojoClassName = pojoClassName;

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/POJOWebServiceHolderWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/POJOWebServiceHolderWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/POJOWebServiceHolderWrapper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/ServletHolderWrapper.java (from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyServletHolder.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/ServletHolderWrapper.java?p2=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/ServletHolderWrapper.java&p1=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyServletHolder.java&r1=788556&r2=789622&rev=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyServletHolder.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/ServletHolderWrapper.java Tue Jun 30 08:51:31 2009
@@ -43,7 +43,7 @@
  */
 
 @GBean(j2eeType = NameFactory.SERVLET)
-public class JettyServletHolder implements ServletNameSource, Servlet, GBeanLifecycle {
+public class ServletHolderWrapper implements ServletNameSource, Servlet, GBeanLifecycle {
 
 
     private final JettyServletRegistration servletRegistration;
@@ -51,13 +51,13 @@
     private final String objectName;
 
     //todo consider interface instead of this constructor for endpoint use.
-    public JettyServletHolder() {
+    public ServletHolderWrapper() {
         servletRegistration = null;
         servletHolder = null;
         objectName = null;
     }
 
-    public JettyServletHolder(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
+    public ServletHolderWrapper(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
                               @ParamAttribute(name = "servletName") String servletName,
                               @ParamAttribute(name = "servletClass") String servletClassName,
                               @ParamAttribute(name = "jspFile") String jspFile,
@@ -68,7 +68,7 @@
                               @ParamReference(name = "JettyServletRegistration", namingType = NameFactory.WEB_MODULE) JettyServletRegistration context) throws Exception {
         servletRegistration = context;
         Subject runAsSubject = context == null ? null : context.getSubjectForRole(runAsRole);
-        servletHolder = new InternalJettyServletHolder(context == null ? null : context.getIntegrationContext(), runAsSubject, servletRegistration);
+        servletHolder = new GeronimoServletHolder(context == null ? null : context.getIntegrationContext(), runAsSubject, servletRegistration);
         servletHolder.setName(servletName);
         servletHolder.setClassName(servletClassName);
         //context will be null only for use as "default servlet info holder" in deployer.

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/ServletHolderWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/ServletHolderWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/ServletHolderWrapper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java (from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java?p2=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java&p1=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java&r1=788556&r2=789622&rev=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java Tue Jun 30 08:51:31 2009
@@ -17,7 +17,6 @@
 
 package org.apache.geronimo.jetty7;
 
-import java.io.File;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -48,7 +47,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.j2ee.management.impl.InvalidObjectNameException;
 import org.apache.geronimo.jetty7.handler.IntegrationContext;
-import org.apache.geronimo.jetty7.handler.TwistyWebAppContext;
+import org.apache.geronimo.jetty7.handler.GeronimoWebAppContext;
 import org.apache.geronimo.jetty7.security.SecurityHandlerFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.ObjectNameUtil;
@@ -77,8 +76,8 @@
 
 @GBean(name="Jetty WebApplication Context",
 j2eeType=NameFactory.WEB_MODULE)
-public class JettyWebAppContext implements GBeanLifecycle, JettyServletRegistration, WebModule {
-    private static final Logger log = LoggerFactory.getLogger(JettyWebAppContext.class);
+public class WebAppContextWrapper implements GBeanLifecycle, JettyServletRegistration, WebModule {
+    private static final Logger log = LoggerFactory.getLogger(WebAppContextWrapper.class);
 
     private final String originalSpecDD;
     private final J2EEServer server;
@@ -91,7 +90,7 @@
     private String displayName;
 
     private final String objectName;
-    private final TwistyWebAppContext webAppContext;
+    private final GeronimoWebAppContext webAppContext;
     private final Context componentContext;
     private final Holder holder;
     private final RunAsSource runAsSource;
@@ -105,7 +104,7 @@
     private IntegrationContext integrationContext;
 
 
-    public JettyWebAppContext(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
+    public WebAppContextWrapper(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
                               @ParamAttribute(name = "contextPath") String contextPath,
                               @ParamAttribute(name = "deploymentDescriptor") String originalSpecDD,
                               @ParamAttribute(name = "componentContext") Map<String, Object> componentContext,
@@ -188,7 +187,7 @@
         GeronimoUserTransaction userTransaction = new GeronimoUserTransaction(transactionManager);
         this.componentContext = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext, userTransaction, kernel, classLoader);
         integrationContext = new IntegrationContext(this.componentContext, unshareableResources, applicationManagedSecurityResources, trackedConnectionAssociator, userTransaction);
-        webAppContext = new TwistyWebAppContext(securityHandler, sessionHandler, servletHandler, null, integrationContext, classLoader);
+        webAppContext = new GeronimoWebAppContext(securityHandler, sessionHandler, servletHandler, null, integrationContext, classLoader);
         webAppContext.setContextPath(contextPath);
         //See Jetty-386.  Setting this to true can expose secured content.
         webAppContext.setCompactPath(compactPath);
@@ -204,7 +203,7 @@
             Map<String, Object> servletContext = new HashMap<String, Object>();
             Map<Class, Object> customizerContext = new HashMap<Class, Object>();
             customizerContext.put(Map.class, servletContext);
-            customizerContext.put(Context.class, JettyWebAppContext.this.componentContext);
+            customizerContext.put(Context.class, WebAppContextWrapper.this.componentContext);
             contextCustomizer.customize(customizerContext);
             for (Map.Entry<String, Object> entry: servletContext.entrySet()) {
                 webAppContext.setAttribute(entry.getKey(), entry.getValue());
@@ -333,7 +332,7 @@
     public void doStop() throws Exception {
         webAppContext.stop();
         jettyContainer.removeContext(webAppContext);
-        log.debug("JettyWebAppContext stopped");
+        log.debug("WebAppContextWrapper stopped");
     }
 
     public void doFail() {
@@ -343,7 +342,7 @@
             //ignore
         }
 
-        log.warn("JettyWebAppContext failed");
+        log.warn("WebAppContextWrapper failed");
     }
     //pass through attributes.  They should be constructor params
 

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBServletHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBServletHandler.java?rev=789622&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBServletHandler.java (added)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBServletHandler.java Tue Jun 30 08:51:31 2009
@@ -0,0 +1,232 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.jetty7.handler;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.ServletException;
+
+import org.eclipse.jetty.servlet.ServletHandler;
+import org.eclipse.jetty.server.Request;
+import org.eclipse.jetty.server.Response;
+import org.eclipse.jetty.http.HttpException;
+import org.apache.geronimo.webservices.WebServiceContainer;
+
+/**
+ * ServletHandler that always delegates to a WebServiceContainer, presumably an EJB web service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class EJBServletHandler extends ServletHandler {
+
+    private final WebServiceContainer webServiceContainer;
+
+    public EJBServletHandler(WebServiceContainer webServiceContainer) {
+        this.webServiceContainer = webServiceContainer;
+    }
+
+    @Override
+    public void doScope(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
+        if (false)
+            nextScope(target,baseRequest,request,response);
+        else if (_nextScope!=null)
+            _nextScope.doScope(target,baseRequest,request, response);
+        else if (_outerScope!=null)
+            _outerScope.doHandle(target,baseRequest,request, response);
+        else
+            doHandle(target,baseRequest,request, response);
+        // end manual inline (pathentic attempt to reduce stack depth)
+    }
+
+    @Override
+    public void doHandle(String target, Request baseRequest, HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+        Response jettyResponse = (Response) res;
+        res.setContentType("text/xml");
+        RequestAdapter request = new RequestAdapter(baseRequest);
+        ResponseAdapter response = new ResponseAdapter(jettyResponse);
+
+        request.setAttribute(WebServiceContainer.SERVLET_REQUEST, req);
+        request.setAttribute(WebServiceContainer.SERVLET_RESPONSE, res);
+        // TODO: add support for context
+        request.setAttribute(WebServiceContainer.SERVLET_CONTEXT, null);
+
+        if (req.getParameter("wsdl") != null) {
+            try {
+                webServiceContainer.getWsdl(request, response);
+                baseRequest.setHandled(true);
+            } catch (IOException e) {
+                throw e;
+            } catch (Exception e) {
+                throw (HttpException) new HttpException(500, "Could not fetch wsdl!").initCause(e);
+            }
+        } else {
+            try {
+                webServiceContainer.invoke(request, response);
+                baseRequest.setHandled(true);
+            } catch (IOException e) {
+                throw e;
+            } catch (Exception e) {
+                throw (HttpException) new HttpException(500, "Could not process message!").initCause(e);
+            }
+        }
+    }
+
+    public static class RequestAdapter implements WebServiceContainer.Request {
+        private final Request request;
+        private URI uri;
+
+        public RequestAdapter(Request request) {
+            this.request = request;
+        }
+
+        public String getHeader(String name) {
+            return request.getHeader(name);
+        }
+
+        public java.net.URI getURI() {
+            if (uri == null) {
+                try {
+                    //String uriString = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getRequestURI();
+                    //return new java.net.URI(uri.getScheme(),uri.getHost(),uri.getPath(),uri.);
+                    uri = new java.net.URI(request.getScheme(), null, request.getServerName(), request.getServerPort(), request.getRequestURI(), request.getQueryString(), null);
+                } catch (URISyntaxException e) {
+                    throw new IllegalStateException(e.getMessage(), e);
+                }
+            }
+            return uri;
+        }
+
+        public int getContentLength() {
+            return request.getContentLength();
+        }
+
+        public String getContentType() {
+            return request.getContentType();
+        }
+
+        public InputStream getInputStream() throws IOException {
+            return request.getInputStream();
+        }
+
+        public int getMethod() {
+            Integer method = methods.get(request.getMethod());
+            return method == null ? UNSUPPORTED : method;
+        }
+
+        public String getParameter(String name) {
+            return request.getParameter(name);
+        }
+
+        public Map getParameters() {
+            return request.getParameterMap();
+        }
+
+        public Object getAttribute(String name) {
+            return request.getAttribute(name);
+        }
+
+        public void setAttribute(String name, Object value) {
+            request.setAttribute(name, value);
+        }
+
+        public String getRemoteAddr() {
+            return request.getRemoteAddr();
+        }
+
+        public String getContextPath() {
+            //request.getContextPath() isn't working correctly and returned null.
+            //use getRequestURI() for now before it is fixed.
+            //return request.getContextPath();
+            return request.getRequestURI();
+        }
+
+        private static final Map<String, Integer> methods = new HashMap<String, Integer>();
+
+        static {
+            methods.put("OPTIONS", OPTIONS);
+            methods.put("GET", GET);
+            methods.put("HEAD", HEAD);
+            methods.put("POST", POST);
+            methods.put("PUT", PUT);
+            methods.put("DELETE", DELETE);
+            methods.put("TRACE", TRACE);
+            methods.put("CONNECT", CONNECT);
+        }
+
+    }
+
+    public static class ResponseAdapter implements WebServiceContainer.Response {
+        private final Response response;
+
+        public ResponseAdapter(Response response) {
+            this.response = response;
+        }
+
+        public void setHeader(String name, String value) {
+            response.setHeader(name, value);
+        }
+
+        public String getHeader(String name) {
+            return response.getHeader(name);
+        }
+
+        public OutputStream getOutputStream() {
+            try {
+                return response.getOutputStream();
+            } catch (IOException e) {
+                throw new IllegalStateException(e.getMessage(), e);
+            }
+        }
+
+        public void setStatusCode(int code) {
+            response.setStatus(code);
+        }
+
+        public int getStatusCode() {
+            return response.getStatus();
+        }
+
+        public void setContentType(String type) {
+            response.setContentType(type);
+        }
+
+        public String getContentType() {
+            return response.getContentType();
+        }
+
+        public void setStatusMessage(String responseString) {
+            response.setStatus(response.getStatus(), responseString);
+        }
+
+        public void flushBuffer() throws java.io.IOException {
+            response.flushBuffer();
+        }
+    }
+    
+}

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBServletHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBServletHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBServletHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceContext.java (from r788556, geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyEJBWebServiceContext.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceContext.java?p2=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceContext.java&p1=geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyEJBWebServiceContext.java&r1=788556&r2=789622&rev=789622&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyEJBWebServiceContext.java (original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceContext.java Tue Jun 30 08:51:31 2009
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty7;
+package org.apache.geronimo.jetty7.handler;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -29,309 +29,25 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.geronimo.webservices.WebServiceContainer;
+import org.apache.geronimo.jetty7.security.SecurityHandlerFactory;
 import org.eclipse.jetty.server.Request;
 import org.eclipse.jetty.server.Response;
-import org.eclipse.jetty.server.handler.ContextHandler;
 import org.eclipse.jetty.http.HttpException;
+import org.eclipse.jetty.servlet.ServletHandler;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.security.SecurityHandler;
 
 /**
- * Delegates requests to a WebServiceContainer which is presumably for an EJB WebService.
- * <p/>
- * WebServiceContainer delegates to an EJBContainer that will ultimately provide the JNDI,
- * TX, and Security services for this web service.
- * <p/>
- * Nothing stopping us from using this for POJOs or other types of webservices if shared
- * Context (JNDI, tx, security) wasn't required to be supplied by the web context.
- * <p/>
- * From a 10,000 foot view the Jetty architecture has:
- * Container -> Context -> Holder -> Servlet
- * <p/>
- * A Container has multiple Contexts, typically webapps
- * A Context provides the JNDI, TX, and Security for the webapp and has many Holders
- * A Holder simply wraps each Servlet
- * <p/>
- * The POJO Web Service architecture on Jetty looks like this:
- * Container -> WebApp Context -> JettyPOJOWebServiceHolder -> POJOWebServiceServlet
- * <p/>
- * The EJB Web Service architecure, on the other hand, creates one Context for each EJB:
- * Container -> JettyEJBWebServiceContext
- *
+ * Specialization of ContextHandler that just has a security and servlet handler.
  * @version $Rev$ $Date$
  */
-public class JettyEJBWebServiceContext extends ContextHandler {
+public class EJBWebServiceContext extends ServletContextHandler {
 
-    private final String contextPath;
-    private final WebServiceContainer webServiceContainer;
-//    private final Authenticator authenticator;
-//    private final JAASJettyRealm realm;
-    private final boolean isConfidentialTransportGuarantee;
-    private final boolean isIntegralTransportGuarantee;
-    private final ClassLoader classLoader;
-
-
-    public JettyEJBWebServiceContext(String contextPath, WebServiceContainer webServiceContainer, String realmName, String transportGuarantee, String authMethod, ClassLoader classLoader) {
-        this.contextPath = contextPath;
-        this.webServiceContainer = webServiceContainer;
+    public EJBWebServiceContext(String contextPath, SecurityHandler securityHandler, ServletHandler servletHandler, ClassLoader classLoader) {
+        super(null, contextPath, null, securityHandler, servletHandler, null);
         this.setContextPath(contextPath);
+        setClassLoader(classLoader);
         this.setAllowNullPathInfo(true);
-        
-//        if (internalJAASJettyRealm != null) {
-        if (realmName != null) {
-//            realm = new JAASJettyRealm(realmName, internalJAASJettyRealm);
-            //TODO
-            //not used???
-            //setUserRealm(realm);
-//            this.realm = realm;
-            if ("NONE".equals(transportGuarantee)) {
-                isConfidentialTransportGuarantee = false;
-                isIntegralTransportGuarantee = false;
-            } else if ("INTEGRAL".equals(transportGuarantee)) {
-                isConfidentialTransportGuarantee = false;
-                isIntegralTransportGuarantee = true;
-            } else if ("CONFIDENTIAL".equals(transportGuarantee)) {
-                isConfidentialTransportGuarantee = true;
-                isIntegralTransportGuarantee = false;
-            } else {
-                throw new IllegalArgumentException("Invalid transport-guarantee: " + transportGuarantee);
-            }
-//            if ("BASIC".equals(authMethod)) {
-//                authenticator = new BasicAuthenticator();
-//            } else if ("DIGEST".equals(authMethod)) {
-//                authenticator = new DigestAuthenticator();
-//            } else if ("CLIENT-CERT".equals(authMethod)) {
-//                authenticator = new ClientCertAuthenticator();
-//            } else if ("NONE".equals(authMethod)) {
-//                authenticator = null;
-//            } else {
-//                throw new IllegalArgumentException("Invalid authMethod: " + authMethod);
-//            }
-        } else {
-//            realm = null;
-//            authenticator = null;
-            isConfidentialTransportGuarantee = false;
-            isIntegralTransportGuarantee = false;
-        }
-        this.classLoader = classLoader;
-    }
-
-    public String getName() {
-        //need a better name
-        return contextPath;
-    }
-
-    public void doHandle(String target, Request baseRequest, HttpServletRequest req, HttpServletResponse res)
-            throws IOException, ServletException
-    {
-        //TODO
-        //do we need to check that this request should be handled by this handler?
-//        if (! target.startsWith(contextPath)) {
-//            return;
-//        }
-//        Request jettyRequest = (Request) req;
-        Response jettyResponse = (Response) res;
-        res.setContentType("text/xml");
-        RequestAdapter request = new RequestAdapter(baseRequest);
-        ResponseAdapter response = new ResponseAdapter(jettyResponse);
-
-        request.setAttribute(WebServiceContainer.SERVLET_REQUEST, req);
-        request.setAttribute(WebServiceContainer.SERVLET_RESPONSE, res);
-        // TODO: add support for context
-        request.setAttribute(WebServiceContainer.SERVLET_CONTEXT, null);
-
-        if (req.getParameter("wsdl") != null) {
-            try {
-                webServiceContainer.getWsdl(request, response);
-                baseRequest.setHandled(true);
-            } catch (IOException e) {
-                throw e;
-            } catch (Exception e) {
-                throw (HttpException) new HttpException(500, "Could not fetch wsdl!").initCause(e);
-            }
-        } else {
-            if (isConfidentialTransportGuarantee) {
-                if (!req.isSecure()) {
-                    throw new HttpException(403, null);
-                }
-            } else if (isIntegralTransportGuarantee) {
-                if (!baseRequest.getConnection().isIntegral(baseRequest)) {
-                    throw new HttpException(403, null);
-                }
-            }
-            Thread currentThread = Thread.currentThread();
-            ClassLoader oldClassLoader = currentThread.getContextClassLoader();
-            currentThread.setContextClassLoader(classLoader);
-            //hard to imagine this could be anything but null, but....
-//            Subject oldSubject = ContextManager.getCurrentCaller();
-            try {
-//                if (authenticator != null) {
-//                    String pathInContext = org.mortbay.util.URIUtil.canonicalPath(req.getContextPath());
-//                    if (authenticator.authenticate(realm, pathInContext, jettyRequest, jettyResponse) == null) {
-//                        throw new HttpException(403, null);
-//                    }
-//                } else {
-//                    //EJB will figure out correct defaultSubject shortly
-//                    //TODO consider replacing the GenericEJBContainer.DefaultSubjectInterceptor with this line
-//                    //setting the defaultSubject.
-//                    ContextManager.popCallers(null);
-//                }
-                try {
-                    webServiceContainer.invoke(request, response);
-                    baseRequest.setHandled(true);
-                } catch (IOException e) {
-                    throw e;
-                } catch (Exception e) {
-                    throw (HttpException) new HttpException(500, "Could not process message!").initCause(e);
-                }
-            } finally {
-//                ContextManager.setCurrentCaller(oldSubject);
-                currentThread.setContextClassLoader(oldClassLoader);
-            }
-        }
-
-    }
-
-    public String getContextPath() {
-        return contextPath;
     }
 
-//    public String getSecurityRealmName() {
-//        if (realm == null) {
-//            return null;
-//        } else {
-//            return realm.getSecurityRealmName();
-//        }
-//    }
-
-    public static class RequestAdapter implements WebServiceContainer.Request {
-        private final Request request;
-        private URI uri;
-
-        public RequestAdapter(Request request) {
-            this.request = request;
-        }
-
-        public String getHeader(String name) {
-            return request.getHeader(name);
-        }
-
-        public java.net.URI getURI() {
-            if (uri == null) {
-                try {
-                    //String uriString = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getRequestURI();
-                    //return new java.net.URI(uri.getScheme(),uri.getHost(),uri.getPath(),uri.);
-                    uri = new java.net.URI(request.getScheme(), null, request.getServerName(), request.getServerPort(), request.getRequestURI(), request.getQueryString(), null);
-                } catch (URISyntaxException e) {
-                    throw new IllegalStateException(e.getMessage(), e);
-                }
-            }
-            return uri;
-        }
-
-        public int getContentLength() {
-            return request.getContentLength();
-        }
-
-        public String getContentType() {
-            return request.getContentType();
-        }
-
-        public InputStream getInputStream() throws IOException {
-            return request.getInputStream();
-        }
-
-        public int getMethod() {
-            Integer method = (Integer) methods.get(request.getMethod());
-            return method == null ? UNSUPPORTED : method.intValue();
-        }
-
-        public String getParameter(String name) {
-            return request.getParameter(name);
-        }
-
-        public Map getParameters() {
-            return request.getParameterMap();
-        }
-
-        public Object getAttribute(String name) {
-            return request.getAttribute(name);
-        }
-
-        public void setAttribute(String name, Object value) {
-            request.setAttribute(name, value);
-        }
-
-        public String getRemoteAddr() {
-            return request.getRemoteAddr();
-        }
-
-        public String getContextPath() {
-            //request.getContextPath() isn't working correctly and returned null.  
-            //use getRequestURI() for now before it is fixed.
-            //return request.getContextPath();
-            return request.getRequestURI();
-        }
-
-        private static final Map methods = new HashMap();
-
-        static {
-            methods.put("OPTIONS", new Integer(OPTIONS));
-            methods.put("GET", new Integer(GET));
-            methods.put("HEAD", new Integer(HEAD));
-            methods.put("POST", new Integer(POST));
-            methods.put("PUT", new Integer(PUT));
-            methods.put("DELETE", new Integer(DELETE));
-            methods.put("TRACE", new Integer(TRACE));
-            methods.put("CONNECT", new Integer(CONNECT));
-        }
-
-    }
-
-    public static class ResponseAdapter implements WebServiceContainer.Response {
-        private final Response response;
-
-        public ResponseAdapter(Response response) {
-            this.response = response;
-        }
-
-        public void setHeader(String name, String value) {
-            response.setHeader(name, value);
-        }
-
-        public String getHeader(String name) {
-            return response.getHeader(name);
-        }
-
-        public OutputStream getOutputStream() {
-            try {
-                return response.getOutputStream();
-            } catch (IOException e) {
-                throw new IllegalStateException(e.getMessage(), e);
-            }
-        }
-
-        public void setStatusCode(int code) {
-            response.setStatus(code);
-        }
-
-        public int getStatusCode() {
-            return response.getStatus();
-         }
-
-        public void setContentType(String type) {
-            response.setContentType(type);
-        }
-
-        public String getContentType() {
-            return response.getContentType();
-        }
-
-        public void setStatusMessage(String responseString) {
-            response.setStatus(response.getStatus(), responseString);
-        }
-
-        public void flushBuffer() throws java.io.IOException{
-            response.flushBuffer();
-        }
-    }
-    
 }

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceContext.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceContext.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceSecurityHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceSecurityHandler.java?rev=789622&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceSecurityHandler.java (added)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceSecurityHandler.java Tue Jun 30 08:51:31 2009
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.jetty7.handler;
+
+import java.io.IOException;
+import java.security.AccessControlContext;
+import java.security.Permission;
+
+import javax.security.jacc.WebUserDataPermission;
+
+import org.eclipse.jetty.security.SecurityHandler;
+import org.eclipse.jetty.security.Authenticator;
+import org.eclipse.jetty.security.LoginService;
+import org.eclipse.jetty.security.IdentityService;
+import org.eclipse.jetty.server.Request;
+import org.eclipse.jetty.server.Response;
+import org.eclipse.jetty.server.UserIdentity;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class EJBWebServiceSecurityHandler extends SecurityHandler {
+
+    private final Permission permission;
+
+    public EJBWebServiceSecurityHandler(
+            Authenticator authenticator,
+            final LoginService loginService,
+            IdentityService identityService,
+            Permission permission) {
+        setAuthenticator(authenticator);
+
+        loginService.setIdentityService(identityService);
+        setLoginService(loginService);
+        setIdentityService(identityService);
+        this.permission = permission;
+    }
+
+    protected Object prepareConstraintInfo(String pathInContext, Request request) {
+        return null;
+    }
+
+    protected boolean checkUserDataPermissions(String pathInContext, Request request, Response response, Object constraintInfo) throws IOException {
+        return permission.implies(new WebUserDataPermission(request));
+    }
+
+    protected boolean isAuthMandatory(Request baseRequest, Response base_response, Object constraintInfo) {
+        //TODO we were given a list of protected methods, but how to we figure out what the method is?
+        return true;
+    }
+
+    protected boolean checkWebResourcePermissions(String pathInContext, Request request, Response response, Object constraintInfo, UserIdentity userIdentity) throws IOException {
+        return true;
+    }
+}

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceSecurityHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceSecurityHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/EJBWebServiceSecurityHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message