geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject cvs commit: incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty JettyWebApplicationContext.java
Date Wed, 23 Jun 2004 07:24:33 GMT
jboynes     2004/06/23 00:24:33

  Modified:    modules/jetty/src/java/org/apache/geronimo/jetty
                        JettyWebApplicationContext.java
  Log:
  Apply patch from GERONIMO-248 for classloader issue
  
  Revision  Changes    Path
  1.22      +10 -5     incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebApplicationContext.java
  
  Index: JettyWebApplicationContext.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebApplicationContext.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- JettyWebApplicationContext.java	5 Jun 2004 07:53:21 -0000	1.21
  +++ JettyWebApplicationContext.java	23 Jun 2004 07:24:33 -0000	1.22
  @@ -68,6 +68,7 @@
       private final TransactionManager txManager;
       private final TrackedConnectionAssociator associator;
       private final UserTransactionImpl userTransaction;
  +    private final ClassLoader classLoader;
   
       // @todo get these from DD
       private final Set unshareableResources;
  @@ -79,7 +80,7 @@
       private PolicyConfiguration policyConfiguration;
   
       public JettyWebApplicationContext() {
  -        this(null, null, null, null, null, null, null, null, null, null);
  +        this(null, null, null, null, null, null, null, null, null, null, null);
       }
   
       public JettyWebApplicationContext(ConfigurationParent config,
  @@ -91,7 +92,8 @@
               Set applicationManagedSecurityResources,
               TransactionManager txManager,
               TrackedConnectionAssociator associator,
  -            UserTransactionImpl userTransaction) {
  +            UserTransactionImpl userTransaction,
  +            ClassLoader classLoader) {
           super();
           this.config = config;
           this.uri = uri;
  @@ -103,6 +105,7 @@
           this.txManager = txManager;
           this.associator = associator;
           this.userTransaction = userTransaction;
  +        this.classLoader = classLoader;
   
           setConfiguration(new JettyXMLConfiguration(this));
       }
  @@ -229,7 +232,7 @@
   
           ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
           try {
  -            Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
  +            Thread.currentThread().setContextClassLoader(classLoader);
               super.start();
           } finally {
               Thread.currentThread().setContextClassLoader(oldCL);
  @@ -303,6 +306,7 @@
           infoFactory.addAttribute("UnshareableResources", Set.class, true);
           infoFactory.addAttribute("ApplicationManagedSecurityResources", Set.class, true);
           infoFactory.addAttribute("UserTransaction", UserTransactionImpl.class, true);
  +        infoFactory.addAttribute("classLoader", ClassLoader.class, false);
   
           infoFactory.addReference("Configuration", ConfigurationParent.class);
           infoFactory.addReference("JettyContainer", JettyContainer.class);
  @@ -319,7 +323,8 @@
               "ApplicationManagedSecurityResources",
               "TransactionManager",
               "TrackedConnectionAssociator",
  -            "UserTransaction"});
  +            "UserTransaction",
  +            "classLoader"});
   
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
  
  
  

Mime
View raw message