geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r394289 [2/2] - in /geronimo/sandbox/servlet-2.5: ./ modules/client-builder/src/java/org/apache/geronimo/client/builder/ modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ modules/j2ee-builder/src/java/org/apache/g...
Date Sat, 15 Apr 2006 13:45:52 GMT
Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java Sat Apr 15 06:45:49 2006
@@ -62,22 +62,32 @@
 import org.apache.geronimo.transaction.TrackedConnectionAssociator;
 import org.apache.geronimo.transaction.context.OnlineUserTransaction;
 import org.apache.geronimo.transaction.context.TransactionContextManager;
-import org.mortbay.http.*;
+import org.mortbay.jetty.HttpException;
+import org.mortbay.jetty.Request;
+import org.mortbay.jetty.Response;
+import org.mortbay.jetty.SessionManager;
+import org.mortbay.jetty.handler.ErrorHandler;
 import org.mortbay.jetty.servlet.AbstractSessionManager;
 import org.mortbay.jetty.servlet.Dispatcher;
 import org.mortbay.jetty.servlet.FilterHolder;
-import org.mortbay.jetty.servlet.JSR154Filter;
+import org.mortbay.jetty.servlet.ServletHandler;
+import org.mortbay.jetty.servlet.ServletMapping;
+
 import org.mortbay.jetty.servlet.ServletHolder;
-import org.mortbay.jetty.servlet.SessionManager;
-import org.mortbay.jetty.servlet.WebApplicationContext;
-import org.mortbay.jetty.servlet.WebApplicationHandler;
+
+import org.mortbay.jetty.servlet.SessionHandler;
+
+import org.mortbay.jetty.webapp.Configuration;
+import org.mortbay.jetty.webapp.WebAppContext;
+import org.mortbay.jetty.webapp.WebAppContext.WebAppErrorHandler;
+import org.mortbay.jetty.security.Authenticator;
 
 /**
  * Wrapper for a WebApplicationContext that sets up its J2EE environment.
  *
  * @version $Rev$ $Date$
  */
-public class JettyWebAppContext extends WebApplicationContext implements GBeanLifecycle, JettyServletRegistration, WebModule {
+public class JettyWebAppContext  implements GBeanLifecycle, JettyServletRegistration, WebModule {
     private static Log log = LogFactory.getLog(JettyWebAppContext.class);
 
     private final Kernel kernel;
@@ -91,7 +101,6 @@
     private final JettyContainer jettyContainer;
 
     private final URI webAppRoot;
-    private final WebApplicationHandler handler;
     private String displayName;
     private final String[] welcomeFiles;
 
@@ -102,24 +111,19 @@
 
     private final String objectName;
 
-    private String sessionManager;
+    private String sessionManagerClassName;
+    
+    private WebAppContext webAppContext;//delegate 
 
 
-    public static class SessionManagerConfiguration implements WebApplicationContext.Configuration {
+    public class SessionManagerConfiguration implements Configuration {
 
-        private WebApplicationContext webAppContext;
+        private WebAppContext webAppContext;
 
 
         public SessionManagerConfiguration() {
         }
 
-        public void setWebApplicationContext(WebApplicationContext webAppContext) {
-            this.webAppContext = webAppContext;
-        }
-
-        public WebApplicationContext getWebApplicationContext() {
-            return this.webAppContext;
-        }
 
         public void configureClassPath() throws Exception {
         }
@@ -131,15 +135,31 @@
         public void configureWebApp() throws Exception {
             //setup a SessionManager
             log.debug("About to configure a SessionManager");
-            String sessionManagerClassName = ((JettyWebAppContext) webAppContext).getSessionManager();
+            String sessionManagerClassName = JettyWebAppContext.this.getSessionManager();
             if (sessionManagerClassName != null && sessionManagerClassName.trim().length() != 0) {
                 Class clazz = Thread.currentThread().getContextClassLoader().loadClass(sessionManagerClassName);
-                Object o = clazz.newInstance();
-                log.debug("Setting SessionManager type=" + clazz.getName() + " instance=" + o);
-                this.webAppContext.getServletHandler().setSessionManager((SessionManager) o);
+                SessionManager sm = (SessionManager)clazz.newInstance();
+                log.debug("Setting SessionManager type=" + clazz.getName() + " instance=" + sm);
+                getWebAppContext().getSessionHandler().setSessionManager(sm);
             }
         }
 
+        public void setWebAppContext(WebAppContext webAppContext) {
+            this.webAppContext = webAppContext;
+        }
+
+        public WebAppContext getWebAppContext() {
+            return this.webAppContext;
+        }
+
+        public void configureClassLoader() throws Exception {
+             
+        }
+
+        public void deconfigureWebApp() throws Exception {
+            
+        }
+
     }
 
     /**
@@ -154,13 +174,13 @@
         webClassLoader = null;
         jettyContainer = null;
         webAppRoot = null;
-        handler = null;
         chain = null;
         contextLength = 0;
         securityInterceptor = null;
         welcomeFiles = null;
         objectName = null;
-        sessionManager = null;
+        sessionManagerClassName = null;
+        webAppContext = null;
     }
 
     public JettyWebAppContext(String objectName,
@@ -204,6 +224,8 @@
                               J2EEApplication application,
                               Kernel kernel) throws Exception, IllegalAccessException, InstantiationException, ClassNotFoundException {
 
+        
+               
         assert uri != null;
         assert componentContext != null;
         assert userTransaction != null;
@@ -213,20 +235,21 @@
         assert transactionContextManager != null;
         assert trackedConnectionAssociator != null;
         assert jettyContainer != null;
+        // initialize the security, handler and leave the others to be defaulted by jetty
+        this.webAppContext = new WebAppContext(new JettySecurityHandler(), null, null, null);
 
+        this.sessionManagerClassName = sessionManager;
         this.kernel = kernel;
         this.server = server;
         this.application = application;
         this.objectName = objectName;
         ObjectName myObjectName = JMXUtil.getObjectName(objectName);
         verifyObjectName(myObjectName);
-        moduleContext = J2eeContextImpl.newContext(myObjectName, NameFactory.WEB_MODULE);
+        this.moduleContext = J2eeContextImpl.newContext(myObjectName, NameFactory.WEB_MODULE);
 
         this.jettyContainer = jettyContainer;
-
         this.originalSpecDD = originalSpecDD;
-
-        setConfigurationClassNames(new String[]{});
+        this.webAppContext.setConfigurationClasses(new String[]{});
 
         URI root;
         //TODO is there a simpler way to do this?
@@ -245,29 +268,27 @@
             urls[i] = classPathEntry.toURL();
         }
         this.webClassLoader = new JettyClassLoader(urls, webAppRootURL, classLoader, contextPriorityClassLoader);
-        setClassLoader(this.webClassLoader);
+        this.webAppContext.setClassLoader(this.webClassLoader);
 
         if (host != null) {
-            setHosts(host.getHosts());
-            setVirtualHosts(host.getVirtualHosts());
+            this.webAppContext.setHosts(host.getHosts());
+            this.webAppContext.setVirtualHosts(host.getVirtualHosts());
         }
 
-        handler = new WebApplicationHandler();
-        addHandler(handler);
-
         userTransaction.setUp(transactionContextManager, trackedConnectionAssociator);
 
         //stuff from spec dd
-        setDisplayName(displayName);
-        setContextParamMap(contextParamMap);
+        this.webAppContext.setDisplayName(displayName);
+        this.webAppContext.setInitParams(contextParamMap);
+        this.webAppContext.setDistributable(distributable);
+        this.webAppContext.getSecurityHandler().setAuthenticator(authenticator);
         setListenerClassNames(listenerClassNames);
-        setDistributable(distributable);
-        setMimeMap(mimeMap);
+        
+        //TODO - not implemented?
+        //setMimeMap(mimeMap);
         this.welcomeFiles = welcomeFiles;
         setLocaleEncodingMapping(localeEncodingMapping);
         setErrorPages(errorPages);
-        setAuthenticator(authenticator);
-        setRealmName(realmName);
         setTagLibMap(tagLibMap);
         setSessionTimeoutSeconds(sessionTimeoutSeconds);
 
@@ -281,7 +302,7 @@
                 ((ClassLoaderAwareReference) value).setClassLoader(this.webClassLoader);
             }
         }
-        Context enc = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext);
+        javax.naming.Context enc = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext);
 
         int index = 0;
         BeforeAfter interceptor = new InstanceContextBeforeAfter(null, index++, unshareableResources, applicationManagedSecurityResources, trackedConnectionAssociator);
@@ -299,25 +320,18 @@
             InternalJAASJettyRealm internalJAASJettyRealm = jettyContainer.addRealm(securityRealmName);
             //wrap jetty realm with something that knows the dumb realmName
             JAASJettyRealm realm = new JAASJettyRealm(realmName, internalJAASJettyRealm);
-            setRealm(realm);
+            this.webAppContext.getSecurityHandler().setUserRealm(realm);
             this.securityInterceptor = new SecurityContextBeforeAfter(interceptor, index++, index++, policyContextID, defaultPrincipal, authenticator, checkedPermissions, excludedPermissions, roleDesignates, realm, classLoader);
             interceptor = this.securityInterceptor;
         } else {
             securityInterceptor = null;
         }
 //      end JACC
-        interceptor = new RequestWrappingBeforeAfter(interceptor, handler);
+        interceptor = new RequestWrappingBeforeAfter(interceptor, getServletHandler());
         chain = interceptor;
         contextLength = index;
 
-        //cheat -- add jsr154 filter not as a gbean
-        FilterHolder jsr154FilterHolder = new FilterHolder(handler, "jsr154", JSR154Filter.class.getName());
-        handler.addFilterHolder(jsr154FilterHolder);
-        jsr154FilterHolder.setInitParameter("unwrappedDispatch", "true");
-        handler.addFilterPathMapping("/*", "jsr154", Dispatcher.__REQUEST | Dispatcher.__FORWARD | Dispatcher.__INCLUDE | Dispatcher.__ERROR);
-
         configureSessionManager();
-
     }
 
 
@@ -340,14 +354,18 @@
     public String getContainerName() {
         return jettyContainer.getObjectName();
     }
+    
+    public String getContextPath () {
+        return this.webAppContext.getContextPath();
+    }
 
-    public Object enterContextScope(HttpRequest httpRequest, HttpResponse httpResponse) {
+    public Object enterContextScope(Request httpRequest, Response httpResponse) {
         Object[] context = new Object[contextLength];
         chain.before(context, httpRequest, httpResponse);
         return context;
     }
 
-    public void leaveContextScope(HttpRequest httpRequest, HttpResponse httpResponse, Object oldScope) {
+    public void leaveContextScope(Request httpRequest, Response httpResponse, Object oldScope) {
         Object[] context = (Object[]) oldScope;
         chain.after(context, httpRequest, httpResponse);
     }
@@ -359,36 +377,36 @@
 
     public void doStart() throws Exception {
         // reset the classsloader... jetty likes to set it to null when stopping
-        setClassLoader(webClassLoader);
+        this.webAppContext.setClassLoader(webClassLoader);
 
         // merge Geronimo and Jetty Lifecycles
-        if (!isStarting()) {
-            super.start();
+        if (!this.webAppContext.isStarting()) {
+            this.webAppContext.start();
             return;
         }
 
-        ((AbstractSessionManager) getServletHandler().getSessionManager()).setUseRequestedId(true);
+        //TODO check sessionIDManager is configured for cross-context dispatch
 
-        setWAR(webAppRoot.toString());
+        this.webAppContext.setWar(webAppRoot.toString());
 
-        jettyContainer.addContext(this);
+        jettyContainer.addContext(this.webAppContext);
 
         Object context = enterContextScope(null, null);
         try {
-            super.doStart();
+            this.webAppContext.stop();
         } finally {
             leaveContextScope(null, null, context);
         }
         //super.doStart sets welcomefiles to null!!
-        setWelcomeFiles(welcomeFiles);
+        this.webAppContext.setWelcomeFiles(welcomeFiles);
 
         log.debug("JettyWebAppContext started");
     }
 
     public void doStop() throws Exception {
         // merge Geronimo and Jetty Lifecycles
-        if (!isStopping()) {
-            super.stop();
+        if (!this.webAppContext.isStopping()) {
+            this.webAppContext.stop();
             return;
         }
 
@@ -397,10 +415,10 @@
         }
         Object context = enterContextScope(null, null);
         try {
-            super.doStop();
+            this.webAppContext.stop();
         } finally {
             leaveContextScope(null, null, context);
-            jettyContainer.removeContext(this);
+            jettyContainer.removeContext(this.webAppContext);
         }
 
         // No more logging will occur for this ClassLoader. Inform the LogFactory to avoid a memory leak.
@@ -411,31 +429,20 @@
 
     public void doFail() {
         try {
-            //this will call doStop
-            super.stop();
-        } catch (InterruptedException e) {
+            this.webAppContext.stop();
+        } catch (Exception e) {
         }
 
         log.warn("JettyWebAppContext failed");
     }
 
-    //pass through attributes.  They should be constructor params
-
-    //TODO encourage jetty to improve their naming convention.
-    public void setContextParamMap(Map initParameters) {
-        if (initParameters != null) {
-            for (Iterator iterator = initParameters.entrySet().iterator(); iterator.hasNext();) {
-                Map.Entry entry = (Map.Entry) iterator.next();
-                setInitParameter((String) entry.getKey(), (String) entry.getValue());
-            }
-        }
-    }
+   
 
     public void setLocaleEncodingMapping(Map localeEncodingMap) {
         if (localeEncodingMap != null) {
             for (Iterator iterator = localeEncodingMap.entrySet().iterator(); iterator.hasNext();) {
                 Map.Entry entry = (Map.Entry) iterator.next();
-                addLocaleEncoding((String) entry.getKey(), (String) entry.getValue());
+                this.webAppContext.addLocaleEncoding((String) entry.getKey(), (String) entry.getValue());
             }
         }
     }
@@ -444,20 +451,16 @@
         if (eventListeners != null) {
             for (Iterator iterator = eventListeners.iterator(); iterator.hasNext();) {
                 String listenerClassName = (String) iterator.next();
-                Class clazz = loadClass(listenerClassName);
+                Class clazz = this.webAppContext.loadClass(listenerClassName);
                 EventListener listener = (EventListener) clazz.newInstance();
-                addEventListener(listener);
-                handler.addEventListener(listener);
+                this.webAppContext.addEventListener(listener);
             }
         }
     }
 
     public void setErrorPages(Map errorPageMap) {
         if (errorPageMap != null) {
-            for (Iterator iterator = errorPageMap.entrySet().iterator(); iterator.hasNext();) {
-                Map.Entry entry = (Map.Entry) iterator.next();
-                setErrorPage((String) entry.getKey(), (String) entry.getValue());
-            }
+            ((WebAppErrorHandler)this.webAppContext.getErrorHandler()).setErrorPages(errorPageMap);
         }
     }
 
@@ -465,13 +468,13 @@
         if (tagLibMap != null) {
             for (Iterator iterator = tagLibMap.entrySet().iterator(); iterator.hasNext();) {
                 Map.Entry entry = (Map.Entry) iterator.next();
-                setResourceAlias((String) entry.getKey(), (String) entry.getValue());
+                this.webAppContext.setResourceAlias((String) entry.getKey(), (String) entry.getValue());
             }
         }
     }
 
     public void setSessionTimeoutSeconds(int seconds) {
-        handler.setSessionInactiveInterval(seconds);
+        this.webAppContext.getSessionHandler().getSessionManager().setMaxInactiveInterval(seconds);
     }
 
 
@@ -482,7 +485,7 @@
 
     public void setDisplayName(String displayName) {
         this.displayName = displayName;
-        super.setDisplayName(displayName);
+        this.webAppContext.setDisplayName(displayName);
     }
 
     public String getDeploymentDescriptor() {
@@ -514,36 +517,41 @@
     }
 
 
+    public ServletHandler getServletHandler() {
+        return this.webAppContext.getServletHandler();
+    }
+    
+    
     public String getSessionManager() {
-        return this.sessionManager;
+        return this.sessionManagerClassName;
     }
 
 
     private void configureSessionManager() {
-        if (isDistributable())
-            this.sessionManager = jettyContainer.getDistributableSessionManager();
+        if (this.webAppContext.isDistributable())
+            this.sessionManagerClassName = jettyContainer.getDistributableSessionManager();
         else
-            this.sessionManager = jettyContainer.getLocalSessionManager();
-        log.debug("SessionManager classname=" + this.sessionManager);
+            this.sessionManagerClassName = jettyContainer.getLocalSessionManager();
+        log.debug("SessionManager classname=" + this.sessionManagerClassName);
         
-        if (this.sessionManager != null) {
+        if (this.sessionManagerClassName != null) {
             addConfiguration(SessionManagerConfiguration.class.getName());
         }
     }
+    
 
     private void addConfiguration(String configClassName) {
-        String[] configClassNames = getConfigurationClassNames();
+        String[] configClassNames = this.webAppContext.getConfigurationClasses();
         String[] newConfigClassNames = new String[configClassNames == null ? 1 : configClassNames.length + 1];
-//        System.arraycopy(configClassNames, 0, newConfigClassNames, 0, configClassNames.length);
-        //TODO expect an NPE if there are no configClassNames.
-        for (int i = 0; i < configClassNames.length; i++)
+        for (int i = 0; (configClassNames != null) && (i < configClassNames.length); i++)
             newConfigClassNames[i] = configClassNames[i];
 
         newConfigClassNames[newConfigClassNames.length - 1] = configClassName;
-        setConfigurationClassNames(newConfigClassNames);
-        log.debug("Configs:");
-        for (int i = 0; i < newConfigClassNames.length; i++)
-            log.debug(newConfigClassNames[i] + " ");
+        this.webAppContext.setConfigurationClasses(newConfigClassNames);
+        if (log.isDebugEnabled()) {
+            for (int i = 0; i < newConfigClassNames.length; i++)
+                log.debug("Configuration: "+newConfigClassNames[i] + " ");
+        }
     }
 
     /**
@@ -575,11 +583,14 @@
 
     public void registerServletHolder(ServletHolder servletHolder, String servletName, Set servletMappings, Map webRoleRefPermissions) throws Exception {
         //TODO filters
-        handler.addServletHolder(servletHolder);
+        this.webAppContext.getServletHandler().addServlet(servletHolder);
         if (servletMappings != null) {
             for (Iterator iterator = servletMappings.iterator(); iterator.hasNext();) {
                 String urlPattern = (String) iterator.next();
-                handler.mapPathToServlet(urlPattern, servletName);
+                ServletMapping servletMapping = new ServletMapping();
+                servletMapping.setPathSpec(urlPattern);
+                servletMapping.setServletName(servletName);
+                this.webAppContext.getServletHandler().addServletMapping(servletMapping);
             }
         }
 //        if (securityInterceptor != null) {
@@ -593,12 +604,6 @@
         }
     }
 
-    public boolean checkSecurityConstraints(String pathInContext, HttpRequest request, HttpResponse response) throws HttpException, IOException {
-        if (securityInterceptor != null) {
-            return securityInterceptor.checkSecurityConstraints(pathInContext, request, response);
-        }
-        return super.checkSecurityConstraints(pathInContext, request, response);
-    }
 
 
     public static final GBeanInfo GBEAN_INFO;
@@ -656,7 +661,7 @@
 
         infoBuilder.addAttribute("kernel", Kernel.class, false);
         infoBuilder.addAttribute("objectName", String.class, false);
-        infoBuilder.addAttribute("server", String.class, false);
+        infoBuilder.addAttribute("serverObjectName", String.class, false);
         infoBuilder.addAttribute("application", String.class, false);
         infoBuilder.addAttribute("javaVMs", String[].class, false);
         infoBuilder.addAttribute("servlets", String[].class, false);

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebConnector.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebConnector.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebConnector.java Sat Apr 15 06:45:49 2006
@@ -25,33 +25,7 @@
  */
 public interface JettyWebConnector extends WebConnector {
 
-    /**
-     * Gets the minimum number of threads used to service connections from
-     * this connector.
-     */
-    public int getMinThreads();
-
-    /**
-     * Sets the minimum number of threads used to service connections from
-     * this connector.
-     */
-    public void setMinThreads(int threads);
-
-    public int getThreads();
-
-    public int getIdlethreads();
-
-    public String getDefaultScheme();
-
-    public void setMaxIdleTimeMs(int max);
-
-    public int getMaxIdleTimeMs();
-
-    public void setLowThreadsMaxIdleTimeMs(int max);
-
-    public int getLowThreadsMaxIdleTimeMs();
-
-    public void setLowThreads(int lowThreads);
-
-    public int getLowThreads();
+    public void setMaxIdleTime(long maxIdleTime);
+    
+    public long getMaxIdleTime();
 }

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java Sat Apr 15 06:45:49 2006
@@ -21,14 +21,14 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.jetty.JettyContainer;
 import org.apache.geronimo.management.geronimo.WebManager;
-import org.mortbay.http.ajp.AJP13Listener;
+
 
 /**
  * @version $Rev$ $Date$
  */
 public class AJP13Connector extends JettyConnector {
     public AJP13Connector(JettyContainer container) {
-        super(container, new AJP13Listener());
+       throw new UnsupportedOperationException("No AJP13Connector for jetty6");
     }
 
     public String getProtocol() {

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/GeronimoSSLListener.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/GeronimoSSLListener.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/GeronimoSSLListener.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/GeronimoSSLListener.java Sat Apr 15 06:45:49 2006
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.jetty.connector;
 
-import org.mortbay.http.SslListener;
+import org.mortbay.jetty.security.SslSocketConnector;
 import org.apache.geronimo.security.keystore.KeystoreManager;
 
 import javax.net.ssl.SSLServerSocketFactory;
@@ -26,7 +26,7 @@
  *
  * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
  */
-public class GeronimoSSLListener extends SslListener {
+public class GeronimoSSLListener extends SslSocketConnector {
     private KeystoreManager manager;
     private String keyStore;
     private String trustStore;
@@ -37,7 +37,7 @@
     }
 
     protected SSLServerSocketFactory createFactory() throws Exception {
-        return manager.createSSLFactory(null, getProtocol(), getAlgorithm(), keyStore, keyAlias, trustStore, SslListener.class.getClassLoader());
+        return manager.createSSLFactory(null, getProtocol(), getAlgorithm(), keyStore, keyAlias, trustStore, SslSocketConnector.class.getClassLoader());
     }
 
     public String getKeyStore() {

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java Sat Apr 15 06:45:49 2006
@@ -21,14 +21,14 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.jetty.JettyContainer;
 import org.apache.geronimo.management.geronimo.WebManager;
-import org.mortbay.http.SocketListener;
+import org.mortbay.jetty.bio.SocketConnector;
 
 /**
  * @version $Rev$ $Date$
  */
 public class HTTPConnector extends JettyConnector {
     public HTTPConnector(JettyContainer container) {
-        super(container, new SocketListener());
+        super(container, new SocketConnector());
     }
 
     public String getProtocol() {

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java Sat Apr 15 06:45:49 2006
@@ -18,10 +18,6 @@
 package org.apache.geronimo.jetty.connector;
 
 import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.SSLServerSocketFactory;
-import javax.net.ssl.SSLContext;
-
-import org.mortbay.http.SslListener;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -29,7 +25,6 @@
 import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.jetty.JettyContainer;
 import org.apache.geronimo.jetty.JettySecureConnector;
-import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.security.keystore.KeystoreManager;
 
 /**

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java Sat Apr 15 06:45:49 2006
@@ -27,10 +27,10 @@
 import org.apache.geronimo.jetty.JettyContainer;
 import org.apache.geronimo.jetty.JettyWebConnector;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.mortbay.http.HttpListener;
-import org.mortbay.http.SocketListener;
-import org.mortbay.http.ajp.AJP13Listener;
-import org.mortbay.util.ThreadedServer;
+import org.mortbay.jetty.Connector;
+import org.mortbay.jetty.bio.SocketConnector;
+import org.mortbay.jetty.nio.SelectChannelConnector;
+import org.mortbay.jetty.AbstractConnector;
 
 /**
  * Base class for GBeans for Jetty network connectors (HTTP, HTTPS, AJP, etc.).
@@ -40,7 +40,7 @@
 public abstract class JettyConnector implements GBeanLifecycle, JettyWebConnector {
     public final static String CONNECTOR_CONTAINER_REFERENCE = "JettyContainer";
     private final JettyContainer container;
-    protected final HttpListener listener;
+    protected final Connector listener;
     private String connectHost;
 
     /**
@@ -56,15 +56,12 @@
         this.listener = null;
     }
 
-    public JettyConnector(JettyContainer container, HttpListener listener) {
+    public JettyConnector(JettyContainer container, Connector listener) {
         this.container = container;
         this.listener = listener;
     }
 
-    public String getDefaultScheme() {
-        return listener.getDefaultScheme();
-    }
-
+   
     public String getHost() {
         return listener.getHost();
     }
@@ -106,122 +103,92 @@
         return getProtocol().toLowerCase()+"://"+connectHost+(getPort() == getDefaultPort() ? "" : ":"+getPort());
     }
 
-    public void setMinThreads(int minThreads) {
-      ((ThreadedServer)listener).setMinThreads(minThreads);
-    }
-
-    public int getMinThreads() {
-      return ((ThreadedServer)listener).getMinThreads();
-    }
-
-
-    public void setMaxThreads(int maxThreads) {
-      ((ThreadedServer)listener).setMaxThreads(maxThreads);
-    }
-
-    public int getMaxThreads() {
-      return ((ThreadedServer)listener).getMaxThreads();
-    }
-
-    public void setMaxIdleTimeMs(int max) {
-        ((ThreadedServer)listener).setMaxIdleTimeMs(max);
-    }
-
-    public int getMaxIdleTimeMs() {
-      return ((ThreadedServer)listener).getMaxIdleTimeMs();
-    }
-
-    public void setLowThreadsMaxIdleTimeMs(int max) {
-      if (listener instanceof SocketListener)
-        ((SocketListener)listener).setLowResourcePersistTimeMs(max);
-    }
-
-    public int getLowThreadsMaxIdleTimeMs() {
-      if (listener instanceof SocketListener)
-        return ((SocketListener)listener).getLowResourcePersistTimeMs();
-      return -1;
-    }
-
-    public void setLowThreads(int lowThreads) {
-      if (listener instanceof SocketListener)
-        ((SocketListener)listener).setLowResources(lowThreads);
-    }
-
-    public int getLowThreads() {
-      if (listener instanceof SocketListener)
-        return ((SocketListener)listener).getLowResources();
-      return -1;
-    }
-
-    public int getThreads() {
-      return ((ThreadedServer)listener).getThreads();
-    }
-
-    public int getIdlethreads() {
-      return ((ThreadedServer)listener).getIdleThreads();
+    public long getMaxIdleTime () {
+        return ((AbstractConnector)listener).getMaxIdleTime();
     }
     
-    public InetSocketAddress getListenAddress() {
-        return new InetSocketAddress(getHost(), getPort());
+    public void setMaxIdleTime (long idleTime) {
+        ((AbstractConnector)listener).setMaxIdleTime(idleTime);
     }
-
+   
     public int getBufferSizeBytes() {
-        return listener.getBufferSize();
+        //TODO return the request buffer size, what about the response buffer size?
+        return listener.getRequestBufferSize();
     }
 
     public void setBufferSizeBytes(int bytes) {
-        if(listener instanceof SocketListener) {
-            SocketListener socketListener = (SocketListener)listener;
-            socketListener.setBufferSize(bytes);
-        } else if(listener instanceof AJP13Listener) {
-            ((AJP13Listener)listener).setBufferSize(bytes);
-        } else {
-            throw new UnsupportedOperationException(listener == null ? "No Listener" : listener.getClass().getName()); //todo: can this happen?
-        }
+        //TODO what about the response buffer size?
+        listener.setRequestBufferSize(bytes);
     }
 
     public int getAcceptQueueSize() {
-        return ((ThreadedServer)listener).getAcceptQueueSize();
+        return ((AbstractConnector)listener).getAcceptQueueSize();
     }
 
     public void setAcceptQueueSize(int size) {
-        ((ThreadedServer)listener).setAcceptQueueSize(size);
+        ((AbstractConnector)listener).setAcceptQueueSize(size);
     }
 
     public int getLingerMillis() {
-        return ((ThreadedServer)listener).getLingerTimeSecs()*1000;
+        return (int)((AbstractConnector)listener).getSoLingerTime();
     }
 
     public void setLingerMillis(int millis) {
-        ((ThreadedServer)listener).setLingerTimeSecs(Math.round((float)millis/1000f));
+        ((AbstractConnector)listener).setSoLingerTime(millis);
     }
 
     public boolean isTcpNoDelay() {
-        return ((ThreadedServer)listener).getTcpNoDelay();
+        return true;
     }
 
     public void setTcpNoDelay(boolean enable) {
-        ((ThreadedServer)listener).setTcpNoDelay(enable);
+        throw new UnsupportedOperationException(listener == null ? "No Listener" : listener.getClass().getName());
+    }
+    
+    public void setMaxThreads (int maxThreads) {
+        throw new UnsupportedOperationException(listener == null ? "No Listener" : listener.getClass().getName());
+    }
+    
+    public int getMaxThreads () {
+        throw new UnsupportedOperationException(listener == null ? "No Listener" : listener.getClass().getName());
     }
 
     public int getRedirectPort() {
         return listener.getConfidentialPort();
     }
 
+    public InetSocketAddress getListenAddress () {
+        try {
+            return new InetSocketAddress(InetAddress.getByName(listener.getHost()), listener.getPort());
+        } catch (UnknownHostException e) {
+            throw new IllegalStateException("InetSocketAddress cannot be determined for host="+listener.getHost());
+        }
+    }
+    
     public void setRedirectPort(int port) {
-        if(listener instanceof SocketListener) {
-            SocketListener socketListener = (SocketListener)listener;
+        if(listener instanceof SocketConnector) {
+            SocketConnector socketListener = (SocketConnector)listener;
             socketListener.setConfidentialPort(port);
             socketListener.setIntegralPort(port);
             socketListener.setIntegralScheme("https");
             socketListener.setConfidentialScheme("https");
-        } else if(listener instanceof AJP13Listener) {
+        } else if(listener instanceof SelectChannelConnector) {
+            SelectChannelConnector connector = (SelectChannelConnector)listener;
+            connector.setConfidentialPort(port);
+            connector.setIntegralPort(port);
+            connector.setIntegralScheme("https");
+            connector.setConfidentialScheme("https");
+        }
+        /*
+        else if(listener instanceof AJP13Listener) {
             AJP13Listener ajpListener = (AJP13Listener) listener;
             ajpListener.setConfidentialPort(port);
             ajpListener.setIntegralPort(port);
             ajpListener.setIntegralScheme("https");
             ajpListener.setConfidentialScheme("https");
-        } else {
+        } 
+        */
+        else {
             throw new UnsupportedOperationException(listener == null ? "No Listener" : listener.getClass().getName()); //todo: can this happen?
         }
     }
@@ -230,7 +197,6 @@
 
     public void doStart() throws Exception {
         container.addListener(listener);
-        ((ThreadedServer) listener).open();
         listener.start();
     }
 
@@ -240,7 +206,7 @@
                 listener.stop();
                 container.removeListener(listener);
                 return;
-            } catch (InterruptedException e) {
+            } catch (Exception e) {
                 continue;
             }
         }
@@ -252,7 +218,7 @@
                 listener.stop();
                 container.removeListener(listener);
                 return;
-            } catch (InterruptedException e) {
+            } catch (Exception e) {
                 continue;
             }
         }
@@ -263,7 +229,7 @@
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Jetty HTTP Connector", JettyConnector.class);
         infoFactory.addReference(CONNECTOR_CONTAINER_REFERENCE, JettyContainer.class, NameFactory.GERONIMO_SERVICE);
-        infoFactory.addInterface(JettyWebConnector.class, new String[]{"host", "port", "minThreads","maxThreads","bufferSizeBytes","acceptQueueSize","lingerMillis","tcpNoDelay","redirectPort","connectUrl","maxIdleTimeMs","lowThreads","lowThreadsMaxIdleTimeMs",},
+        infoFactory.addInterface(JettyWebConnector.class, new String[]{"host", "port", "maxIdleTime", "bufferSizeBytes","acceptQueueSize","lingerMillis","tcpNoDelay","redirectPort","connectUrl"},
                                                           new String[]{"host", "port", "redirectPort"});
         infoFactory.setConstructor(new String[] {"JettyContainer"});
         GBEAN_INFO = infoFactory.getBeanInfo();

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/BeforeAfter.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/BeforeAfter.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/BeforeAfter.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/BeforeAfter.java Sat Apr 15 06:45:49 2006
@@ -16,16 +16,16 @@
  */
 package org.apache.geronimo.jetty.interceptor;
 
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
+import org.mortbay.jetty.Request;
+import org.mortbay.jetty.Response;
 
 /**
  * @version $Rev$ $Date$
  */
 public interface BeforeAfter {
 
-    void before(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse);
+    void before(Object[] context, Request httpRequest, Response httpResponse);
 
-    void after(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse);
+    void after(Object[] context, Request httpRequest, Response httpResponse);
 
 }

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/ComponentContextBeforeAfter.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/ComponentContextBeforeAfter.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/ComponentContextBeforeAfter.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/ComponentContextBeforeAfter.java Sat Apr 15 06:45:49 2006
@@ -19,8 +19,8 @@
 import javax.naming.Context;
 
 import org.apache.geronimo.naming.java.RootContext;
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
+import org.mortbay.jetty.Request;
+import org.mortbay.jetty.Response;
 
 /**
  * @version $Rev$ $Date$
@@ -37,7 +37,7 @@
         this.componentContext = componentContext;
     }
 
-    public void before(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void before(Object[] context, Request httpRequest, Response httpResponse) {
         context[index] = RootContext.getComponentContext();
         RootContext.setComponentContext(componentContext);
         if (next != null) {
@@ -45,7 +45,7 @@
         }
     }
 
-    public void after(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void after(Object[] context, Request httpRequest, Response httpResponse) {
         if (next != null) {
             next.after(context, httpRequest, httpResponse);
         }

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java Sat Apr 15 06:45:49 2006
@@ -22,8 +22,8 @@
 import org.apache.geronimo.transaction.DefaultInstanceContext;
 import org.apache.geronimo.transaction.InstanceContext;
 import org.apache.geronimo.transaction.TrackedConnectionAssociator;
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
+import org.mortbay.jetty.Request;
+import org.mortbay.jetty.Response;
 
 /**
  * @version $Rev$ $Date$
@@ -44,7 +44,7 @@
         this.trackedConnectionAssociator = trackedConnectionAssociator;
     }
 
-    public void before(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void before(Object[] context, Request httpRequest, Response httpResponse) {
         try {
             context[index] = trackedConnectionAssociator.enter(new DefaultInstanceContext(unshareableResources, applicationManagedSecurityResources));
         } catch (ResourceException e) {
@@ -55,7 +55,7 @@
         }
     }
 
-    public void after(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void after(Object[] context, Request httpRequest, Response httpResponse) {
         if (next != null) {
             next.after(context, httpRequest, httpResponse);
         }

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/RequestWrappingBeforeAfter.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/RequestWrappingBeforeAfter.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/RequestWrappingBeforeAfter.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/RequestWrappingBeforeAfter.java Sat Apr 15 06:45:49 2006
@@ -16,11 +16,10 @@
  */
 package org.apache.geronimo.jetty.interceptor;
 
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
+import org.mortbay.jetty.Request;
+import org.mortbay.jetty.Response;
 import org.mortbay.jetty.servlet.ServletHandler;
-import org.mortbay.jetty.servlet.ServletHttpRequest;
-import org.mortbay.jetty.servlet.ServletHttpResponse;
+
 
 /**
  * @version $Rev$ $Date$
@@ -34,8 +33,10 @@
         this.handler = handler;
     }
     
-    public void before(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
-        if (httpRequest != null) {
+    public void before(Object[] context, Request httpRequest, Response httpResponse) {
+        //TODO - I think this interceptor is no longer necessary
+/*        if (httpRequest != null) {
+            
             ServletHttpRequest request = (ServletHttpRequest) httpRequest.getWrapper();
             if (request == null)
             {
@@ -45,11 +46,11 @@
                 httpRequest.setWrapper(request);
                 httpResponse.setWrapper(response);
             }
-        }
+        }*/
         next.before(context, httpRequest, httpResponse);
     }
 
-    public void after(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void after(Object[] context, Request httpRequest, Response httpResponse) {
         next.after(context, httpRequest, httpResponse);
     }
 }

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/SecurityContextBeforeAfter.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/SecurityContextBeforeAfter.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/SecurityContextBeforeAfter.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/SecurityContextBeforeAfter.java Sat Apr 15 06:45:49 2006
@@ -26,9 +26,13 @@
 import org.apache.geronimo.security.SubjectId;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.geronimo.security.util.ConfigurationUtil;
-import org.mortbay.http.*;
-import org.mortbay.jetty.servlet.FormAuthenticator;
-import org.mortbay.jetty.servlet.ServletHttpRequest;
+
+import org.mortbay.jetty.security.Authenticator;
+import org.mortbay.jetty.security.FormAuthenticator;
+import org.mortbay.jetty.security.SecurityHandler;
+import org.mortbay.jetty.HttpException;
+import org.mortbay.jetty.Request;
+import org.mortbay.jetty.Response;
 
 import javax.security.auth.Subject;
 import javax.security.jacc.PolicyContext;
@@ -114,24 +118,21 @@
         jettyContainer.removeRealm(realm.getSecurityRealmName());
     }
 
-    public void before(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void before(Object[] context, Request httpRequest, Response httpResponse) {
         context[policyContextIDIndex] = PolicyContext.getContextID();
         context[webAppContextIndex] = getCurrentSecurityInterceptor();
 
         PolicyContext.setContextID(policyContextID);
         setCurrentSecurityInterceptor(this);
 
-        if (httpRequest != null) {
-            ServletHttpRequest request = (ServletHttpRequest) httpRequest.getWrapper();
-            PolicyContext.setHandlerData(request);
-        }
+        PolicyContext.setHandlerData(httpRequest);
 
         if (next != null) {
             next.before(context, httpRequest, httpResponse);
         }
     }
 
-    public void after(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void after(Object[] context, Request httpRequest, Response httpResponse) {
         if (next != null) {
             next.after(context, httpRequest, httpResponse);
         }
@@ -172,7 +173,7 @@
      * @return true if the path in context passes the security check,
      *         false if it fails or a redirection has occured during authentication.
      */
-    public boolean checkSecurityConstraints(String pathInContext, HttpRequest request, HttpResponse response) throws HttpException, IOException {
+    public boolean checkSecurityConstraints(String pathInContext, Request request, Response response) throws HttpException, IOException {
         if (formLoginPath != null) {
             String pathToBeTested = (pathInContext.indexOf('?') > 0 ? pathInContext.substring(0, pathInContext.indexOf('?')) : pathInContext);
 
@@ -182,23 +183,22 @@
         }
 
         try {
-            ServletHttpRequest servletHttpRequest = (ServletHttpRequest) request.getWrapper();
             String transportType;
-            if (request.isConfidential()) {
+            if (request.isSecure()) {
                 transportType = "CONFIDENTIAL";
-            } else if (request.isIntegral()) {
+            } else if (request.getConnection().isIntegral(request)) {
                 transportType = "INTEGRAL";
             } else {
                 transportType = "NONE";
             }
-            WebUserDataPermission wudp = new WebUserDataPermission(servletHttpRequest.getServletPath(), new String[]{servletHttpRequest.getMethod()}, transportType);
-            WebResourcePermission webResourcePermission = new WebResourcePermission(servletHttpRequest);
+            WebUserDataPermission wudp = new WebUserDataPermission(request.getServletPath(), new String[]{request.getMethod()}, transportType);
+            WebResourcePermission webResourcePermission = new WebResourcePermission(request);
             Principal user = obtainUser(pathInContext, request, response, webResourcePermission, wudp);
 
             if (user == null) {
                 return false;
             }
-            if (user == SecurityConstraint.__NOBODY) {
+            if (user == SecurityHandler.__NOBODY) {
                 return true;
             }
 
@@ -215,10 +215,10 @@
              */
             acc.checkPermission(webResourcePermission);
         } catch (HttpException he) {
-            response.sendError(he.getCode(), he.getReason());
+            response.sendError(he.getStatus(), he.getReason());
             return false;
         } catch (AccessControlException ace) {
-            response.sendError(HttpResponse.__403_Forbidden);
+            response.sendError(403);
             return false;
         }
         return true;
@@ -240,7 +240,7 @@
      *         security checking should not proceed and servlet handling should proceed,
      *         e.g. login page.
      */
-    private Principal obtainUser(String pathInContext, HttpRequest request, HttpResponse response, WebResourcePermission resourcePermission, WebUserDataPermission dataPermission) throws IOException {
+    private Principal obtainUser(String pathInContext, Request request, Response response, WebResourcePermission resourcePermission, WebUserDataPermission dataPermission) throws IOException {
         boolean unauthenticated = !(checked.implies(resourcePermission) || checked.implies(dataPermission));
         boolean forbidden = excludedPermissions.implies(resourcePermission) || excludedPermissions.implies(dataPermission);
 

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/ThreadClassloaderBeforeAfter.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/ThreadClassloaderBeforeAfter.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/ThreadClassloaderBeforeAfter.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/ThreadClassloaderBeforeAfter.java Sat Apr 15 06:45:49 2006
@@ -16,8 +16,8 @@
  */
 package org.apache.geronimo.jetty.interceptor;
 
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
+import org.mortbay.jetty.Request;
+import org.mortbay.jetty.Response;
 
 
 /**
@@ -37,7 +37,7 @@
         this.classLoader = classLoader;
     }
 
-    public void before(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void before(Object[] context, Request httpRequest, Response httpResponse) {
         Thread thread = Thread.currentThread();
         context[threadIndex] = thread;
         context[classLoaderIndex] = thread.getContextClassLoader();
@@ -47,7 +47,7 @@
         }
     }
 
-    public void after(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void after(Object[] context, Request httpRequest, Response httpResponse) {
         if (next != null) {
             next.after(context, httpRequest, httpResponse);
         }

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/TransactionContextBeforeAfter.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/TransactionContextBeforeAfter.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/TransactionContextBeforeAfter.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/TransactionContextBeforeAfter.java Sat Apr 15 06:45:49 2006
@@ -23,8 +23,8 @@
 
 import org.apache.geronimo.transaction.context.TransactionContext;
 import org.apache.geronimo.transaction.context.TransactionContextManager;
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
+import org.mortbay.jetty.Request;
+import org.mortbay.jetty.Response;
 
 /**
  * @version $Rev$ $Date$
@@ -43,7 +43,7 @@
         this.transactionContextManager = transactionContextManager;
     }
 
-    public void before(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void before(Object[] context, Request httpRequest, Response httpResponse) {
         TransactionContext oldTransactionContext = transactionContextManager.getContext();
         TransactionContext newTransactionContext = null;
         if (oldTransactionContext == null || !oldTransactionContext.isInheritable()) {
@@ -57,7 +57,7 @@
         }
     }
 
-    public void after(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void after(Object[] context, Request httpRequest, Response httpResponse) {
         try {
             if (next != null) {
                 next.after(context, httpRequest, httpResponse);

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/WebApplicationContextBeforeAfter.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/WebApplicationContextBeforeAfter.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/WebApplicationContextBeforeAfter.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/WebApplicationContextBeforeAfter.java Sat Apr 15 06:45:49 2006
@@ -16,9 +16,8 @@
  */
 package org.apache.geronimo.jetty.interceptor;
 
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
-import org.mortbay.http.HttpContext;
+import org.mortbay.jetty.Request;
+import org.mortbay.jetty.Response;
 import org.apache.geronimo.jetty.JettyWebAppContext;
 
 /**
@@ -36,22 +35,24 @@
         this.webAppContext = webAppContext;
     }
 
-    public void before(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
-        if (httpResponse != null) {
+    public void before(Object[] context, Request httpRequest, Response httpResponse) {
+        //TODO - I think this interceptor is no longer necessary
+/*        if (httpResponse != null) {
             context[index] = httpResponse.getHttpContext();
             httpResponse.setHttpContext(webAppContext);
-        }
+        }*/
         if (next != null) {
             next.before(context, httpRequest, httpResponse);
         }
     }
 
-    public void after(Object[] context, HttpRequest httpRequest, HttpResponse httpResponse) {
+    public void after(Object[] context, Request httpRequest, Response httpResponse) {
         if (next != null) {
             next.after(context, httpRequest, httpResponse);
         }
-        if (httpResponse != null) {
+        //TODO - not necessary?
+/*        if (httpResponse != null) {
             httpResponse.setHttpContext((HttpContext) context[index]);
-        }
+        }*/
     }
 }

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java Sat Apr 15 06:45:49 2006
@@ -22,6 +22,7 @@
 import org.apache.geronimo.jetty.JettyContainer;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.mortbay.jetty.RequestLog;
 
 /**
  * @version $Rev$ $Date$
@@ -29,14 +30,14 @@
 public class NCSARequestLog implements GBeanLifecycle, JettyRequestLog {
     private final JettyContainer container;
     private final ServerInfo serverInfo;
-    private final org.mortbay.http.NCSARequestLog requestLog;
+    private final RequestLog requestLog;
     private boolean preferProxiedForAddress;
     private String filename;
 
     public NCSARequestLog(JettyContainer container, ServerInfo serverInfo) {
         this.container = container;
         this.serverInfo = serverInfo;
-        requestLog = new org.mortbay.http.NCSARequestLog();
+        requestLog = new org.mortbay.jetty.NCSARequestLog();
     }
 
     public void setFilename(String filename) {
@@ -48,56 +49,56 @@
     }
 
     public void setLogDateFormat(String format) {
-        requestLog.setLogDateFormat(format);
+        ((org.mortbay.jetty.NCSARequestLog)requestLog).setLogDateFormat(format);
     }
 
     public String getLogDateFormat() {
-        return requestLog.getLogDateFormat();
+        return ((org.mortbay.jetty.NCSARequestLog)requestLog).getLogDateFormat();
     }
 
     public void setLogTimeZone(String tz) {
-        requestLog.setLogTimeZone(tz);
+        ((org.mortbay.jetty.NCSARequestLog)requestLog).setLogTimeZone(tz);
     }
 
     public String getLogTimeZone() {
-        return requestLog.getLogTimeZone();
+        return ((org.mortbay.jetty.NCSARequestLog)requestLog).getLogTimeZone();
     }
 
     public int getRetainDays() {
-        return requestLog.getRetainDays();
+        return ((org.mortbay.jetty.NCSARequestLog)requestLog).getRetainDays();
     }
 
     public void setRetainDays(int retainDays) {
-        requestLog.setRetainDays(retainDays);
+        ((org.mortbay.jetty.NCSARequestLog)requestLog).setRetainDays(retainDays);
     }
 
     public boolean isExtended() {
-        return requestLog.isExtended();
+        return ((org.mortbay.jetty.NCSARequestLog)requestLog).isExtended();
     }
 
     public void setExtended(boolean e) {
-        requestLog.setExtended(e);
+        ((org.mortbay.jetty.NCSARequestLog)requestLog).setExtended(e);
     }
 
     public boolean isAppend() {
-        return requestLog.isAppend();
+        return ((org.mortbay.jetty.NCSARequestLog)requestLog).isAppend();
     }
 
     public void setAppend(boolean a) {
-        requestLog.setAppend(a);
+        ((org.mortbay.jetty.NCSARequestLog)requestLog).setAppend(a);
     }
 
     public void setIgnorePaths(String[] ignorePaths) {
-        requestLog.setIgnorePaths(ignorePaths);
+        ((org.mortbay.jetty.NCSARequestLog)requestLog).setIgnorePaths(ignorePaths);
     }
 
     public String[] getIgnorePaths() {
-        return requestLog.getIgnorePaths();
+        return ((org.mortbay.jetty.NCSARequestLog)requestLog).getIgnorePaths();
     }
 
     public void setPreferProxiedForAddress(boolean value) {
         this.preferProxiedForAddress = value;
-        requestLog.setPreferProxiedForAddress(value);
+        ((org.mortbay.jetty.NCSARequestLog)requestLog).setPreferProxiedForAddress(value);
     }
 
     public boolean isPreferProxiedForAddress() {
@@ -105,23 +106,20 @@
     }
 
     public String getAbsoluteFilePath() {
-        return requestLog == null ? null : requestLog.getDatedFilename();
+        return requestLog == null ? null : ((org.mortbay.jetty.NCSARequestLog)requestLog).getDatedFilename();
     }
 
     public void doStart() throws Exception {
-        requestLog.setFilename(serverInfo.resolveServerPath(filename));
+        ((org.mortbay.jetty.NCSARequestLog)requestLog).setFilename(serverInfo.resolveServerPath(filename));
         container.setRequestLog(requestLog);
-        requestLog.start();
     }
 
     public void doStop() throws Exception {
-        requestLog.stop();
         container.setRequestLog(null);
     }
 
     public void doFail() {
         container.setRequestLog(null);
-        requestLog.stop();
     }
 
     public static final GBeanInfo GBEAN_INFO;

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java Sat Apr 15 06:45:49 2006
@@ -30,7 +30,7 @@
 import javax.management.ObjectName;
 
 import junit.framework.TestCase;
-import org.mortbay.jetty.servlet.FormAuthenticator;
+import org.mortbay.jetty.security.FormAuthenticator;
 
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinatorGBean;
 import org.apache.geronimo.gbean.GBeanData;

Modified: geronimo/sandbox/servlet-2.5/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java Sat Apr 15 06:45:49 2006
@@ -60,19 +60,19 @@
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceEnvRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
-import org.apache.geronimo.xbeans.j2ee.EjbLocalRefType;
-import org.apache.geronimo.xbeans.j2ee.EjbRefType;
-import org.apache.geronimo.xbeans.j2ee.EnvEntryType;
-import org.apache.geronimo.xbeans.j2ee.MessageDestinationRefType;
-import org.apache.geronimo.xbeans.j2ee.MessageDestinationType;
-import org.apache.geronimo.xbeans.j2ee.ParamValueType;
-import org.apache.geronimo.xbeans.j2ee.PortComponentRefType;
-import org.apache.geronimo.xbeans.j2ee.ResourceEnvRefType;
-import org.apache.geronimo.xbeans.j2ee.ResourceRefType;
-import org.apache.geronimo.xbeans.j2ee.ServiceRefHandlerType;
-import org.apache.geronimo.xbeans.j2ee.ServiceRefType;
-import org.apache.geronimo.xbeans.j2ee.XsdQNameType;
-import org.apache.geronimo.xbeans.j2ee.XsdStringType;
+import org.apache.geronimo.xbeans.javaee.EjbLocalRefType;
+import org.apache.geronimo.xbeans.javaee.EjbRefType;
+import org.apache.geronimo.xbeans.javaee.EnvEntryType;
+import org.apache.geronimo.xbeans.javaee.MessageDestinationRefType;
+import org.apache.geronimo.xbeans.javaee.MessageDestinationType;
+import org.apache.geronimo.xbeans.javaee.ParamValueType;
+import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
+import org.apache.geronimo.xbeans.javaee.ResourceEnvRefType;
+import org.apache.geronimo.xbeans.javaee.ResourceRefType;
+import org.apache.geronimo.xbeans.javaee.ServiceRefHandlerType;
+import org.apache.geronimo.xbeans.javaee.ServiceRefType;
+import org.apache.geronimo.xbeans.javaee.XsdQNameType;
+import org.apache.geronimo.xbeans.javaee.XsdStringType;
 
 /**
  * @version $Rev$ $Date$
@@ -604,7 +604,7 @@
         List handlerInfos = new ArrayList();
         for (int i = 0; i < handlers.length; i++) {
             ServiceRefHandlerType handler = handlers[i];
-            org.apache.geronimo.xbeans.j2ee.String[] portNameArray = handler.getPortNameArray();
+            org.apache.geronimo.xbeans.javaee.String[] portNameArray = handler.getPortNameArray();
             List portNames = new ArrayList();
             for (int j = 0; j < portNameArray.length; j++) {
                 portNames.add(portNameArray[j].getStringValue().trim());
@@ -684,7 +684,7 @@
         return clazz;
     }
 
-    private static String getStringValue(org.apache.geronimo.xbeans.j2ee.String string) {
+    private static String getStringValue(org.apache.geronimo.xbeans.javaee.String string) {
         if (string == null) {
             return null;
         }

Modified: geronimo/sandbox/servlet-2.5/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java Sat Apr 15 06:45:49 2006
@@ -40,8 +40,8 @@
 import org.apache.geronimo.deployment.GBeanDataRegistry;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.xbeans.j2ee.MessageDestinationType;
-import org.apache.geronimo.xbeans.j2ee.MessageDestinationRefType;
+import org.apache.geronimo.xbeans.javaee.MessageDestinationType;
+import org.apache.geronimo.xbeans.javaee.MessageDestinationRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.java.ComponentContextBuilder;

Modified: geronimo/sandbox/servlet-2.5/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/sandbox/servlet-2.5/pom.xml?rev=394289&r1=394288&r2=394289&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/pom.xml (original)
+++ geronimo/sandbox/servlet-2.5/pom.xml Sat Apr 15 06:45:49 2006
@@ -163,7 +163,7 @@
     <javaccVersion>2.1</javaccVersion>
     <jdbmVersion>0.20-dev</jdbmVersion>
     <jdomVersion>1.0</jdomVersion>
-    <jettyVersion>5.1.10</jettyVersion>
+    <jettyVersion>6.0-SNAPSHOT</jettyVersion>
     <jstlVersion>1.1.1</jstlVersion>
     <juddiVersion>0.9rc4</juddiVersion>
     <junitVersion>3.8.1</junitVersion>



Mime
View raw message