User: stark   
  Date: 01/02/15 09:34:20

  Modified:    src/main/org/jboss/deployment Installer.java
                        J2eeDeployer.java
  Log:
  Include the patch suggested by David Castro & Gabor Herr to not include
  all ejb jars in the common classpath and to restore the app class loader
  after each war deploy.
  
  Revision  Changes    Path
  1.4       +2 -3      jboss/src/main/org/jboss/deployment/Installer.java
  
  Index: Installer.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/deployment/Installer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Installer.java    2001/01/23 18:35:36     1.3
  +++ Installer.java    2001/02/15 17:34:20     1.4
  @@ -58,7 +58,7 @@
    *
    *   @see <related>
    *   @author <a href="mailto:[EMAIL PROTECTED]">Daniel Schulze</a>
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
    */
   public class Installer
   {
  @@ -305,7 +305,6 @@
                                                d.commonUrls.add 
(install(jarFile.getInputStream(entry), "lib").toURL());
                                        }
                                }
  -*/
   
                                // put all ejb jars to the common classpath too
                                it = d.ejbModules.iterator();
  @@ -313,7 +312,7 @@
                                        log.log("add all ejb jar files to the common 
classpath");
                                while (it.hasNext())
                                        d.commonUrls.add 
(((Deployment.Module)it.next()).localUrls.firstElement());
  -
  +*/
                                break;
                        }
                        saveConfig ();
  
  
  
  1.18      +8 -5      jboss/src/main/org/jboss/deployment/J2eeDeployer.java
  
  Index: J2eeDeployer.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/deployment/J2eeDeployer.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- J2eeDeployer.java 2001/02/08 22:18:44     1.17
  +++ J2eeDeployer.java 2001/02/15 17:34:20     1.18
  @@ -65,7 +65,7 @@
   *  (ContainerFactory for JBoss and EmbededTomcatService for Tomcat).
   *
   *   @author <a href="mailto:[EMAIL PROTECTED]">Daniel Schulze</a>
  -*   @version $Revision: 1.17 $
  +*   @version $Revision: 1.18 $
   */
   public class J2eeDeployer 
   extends ServiceMBeanSupport
  @@ -390,7 +390,10 @@
         
         // set the context classloader for this application
         createContextClassLoader(_d);
  -      
  +
  +      // save the application classloader for later
  +      ClassLoader appCl = Thread.currentThread().getContextClassLoader();
  +
         // redirect all modules to the responsible deployers
         Deployment.Module m = null;
         String message;
  @@ -411,10 +414,10 @@
               // Call the TomcatDeployer that is loaded in the JMX server
               server.invoke(warDeployer, "deploy",
                  new Object[] { m.webContext, m.localUrls.firstElement().toString 
()}, new String[] { "java.lang.String", "java.lang.String" });
  -         }
   
  -              // since tomcat changes the context classloader...
  -         Thread.currentThread().setContextClassLoader (oldCl);
  +            // since tomcat changes the context classloader...
  +            Thread.currentThread().setContextClassLoader (appCl);
  +         }
   
            // JBoss
            it = _d.ejbModules.iterator ();
  
  
  

Reply via email to