geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject cvs commit: incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty JettyWebApplication.java JettyWebApplicationContext.java
Date Tue, 25 Nov 2003 13:51:30 GMT
adc         2003/11/25 05:51:30

  Modified:    modules/web/src/java/org/apache/geronimo/web/jetty
                        JettyWebApplication.java
                        JettyWebApplicationContext.java
  Log:
  I think that the information that is needed for JAAS logins and JACC
  authentication can be stored in these classes for Jetty.
  
  Revision  Changes    Path
  1.7       +2 -1      incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty/JettyWebApplication.java
  
  Index: JettyWebApplication.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty/JettyWebApplication.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JettyWebApplication.java	20 Nov 2003 09:10:17 -0000	1.6
  +++ JettyWebApplication.java	25 Nov 2003 13:51:30 -0000	1.7
  @@ -54,6 +54,7 @@
       }
   
       public ObjectName preRegister(MBeanServer server, ObjectName objectName) throws Exception
{
  +        jettyContext.setServer(server);
           return super.preRegister(server, objectName);
       }
   
  
  
  
  1.3       +26 -1     incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty/JettyWebApplicationContext.java
  
  Index: JettyWebApplicationContext.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty/JettyWebApplicationContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JettyWebApplicationContext.java	20 Nov 2003 09:10:18 -0000	1.2
  +++ JettyWebApplicationContext.java	25 Nov 2003 13:51:30 -0000	1.3
  @@ -60,11 +60,15 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.geronimo.naming.java.ReadOnlyContext;
   import org.apache.geronimo.naming.java.RootContext;
  +import org.apache.geronimo.security.GeronimoLoginConfiguration;
   
   import org.mortbay.http.HttpRequest;
   import org.mortbay.http.HttpResponse;
   import org.mortbay.jetty.servlet.WebApplicationContext;
   
  +import javax.management.MBeanServer;
  +import javax.security.jacc.PolicyContext;
  +
   /**
    * 
    * 
  @@ -72,6 +76,8 @@
    */
   public class JettyWebApplicationContext extends WebApplicationContext {
       private Context componentContext;
  +    private MBeanServer server;
  +    private String contextID;
       private Log log = LogFactory.getLog(JettyWebApplicationContext.class);
   
       public JettyWebApplicationContext() {
  @@ -84,12 +90,15 @@
       public Object enterContextScope(HttpRequest httpRequest, HttpResponse httpResponse)
{
           log.info("Entering context " + httpRequest.getRequestURL());
           RootContext.setComponentContext((ReadOnlyContext)componentContext);
  +        GeronimoLoginConfiguration.setMBeanServer(server);
  +        PolicyContext.setContextID(contextID);
           return super.enterContextScope(httpRequest, httpResponse);
       }
   
       public void leaveContextScope(HttpRequest httpRequest, HttpResponse httpResponse, Object
o) {
           super.leaveContextScope(httpRequest, httpResponse, o);
           RootContext.setComponentContext(null);
  +        PolicyContext.setContextID(null);
           log.info("Leaving context " + httpRequest.getRequestURL());
       }
   
  @@ -99,5 +108,21 @@
   
       public void setComponentContext(Context componentContext) {
           this.componentContext = componentContext;
  +    }
  +
  +    public MBeanServer getServer() {
  +        return server;
  +    }
  +
  +    public void setServer(MBeanServer server) {
  +        this.server = server;
  +    }
  +
  +    public String getContextID() {
  +        return contextID;
  +    }
  +
  +    public void setContextID(String contextID) {
  +        this.contextID = contextID;
       }
   }
  
  
  

Mime
View raw message