User: starksm 
  Date: 02/04/12 13:04:26

  Modified:    src/main/org/jboss/web WebClassLoader.java
  Log:
  Pass the container JMX ObjectName to the class loader rather than the
  container reference to avoid problems with strong references to the
  container
  
  Revision  Changes    Path
  1.5       +11 -11    jboss/src/main/org/jboss/web/WebClassLoader.java
  
  Index: WebClassLoader.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/web/WebClassLoader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WebClassLoader.java       14 Mar 2002 23:37:41 -0000      1.4
  +++ WebClassLoader.java       12 Apr 2002 20:04:26 -0000      1.5
  @@ -2,11 +2,10 @@
   
   import java.net.URL;
   import java.net.URLClassLoader;
  +import javax.management.ObjectName;
   
  -import org.jboss.ejb.Container;
   import org.jboss.system.UnifiedClassLoader;
   
  -
   /** A simple subclass of URLClassLoader that is used in conjunction with the 
   the WebService mbean to allow dynamic loading of resources and classes from 
   deployed ears, ejb jars and wars. A WebClassLoader is associated with a 
  @@ -25,26 +24,26 @@
   @see #getUrls()
   @see #setWebURLs(URL[])
   
  -@author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>.
  +@author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>.
   @author Sacha Labourey <[EMAIL PROTECTED]>
   @author Vladimir Blagojevic <[EMAIL PROTECTED]>
   @author  <a href="mailto:[EMAIL PROTECTED]";>Francisco Reverbel</a>
  -@version $Revision: 1.4 $
  +@version $Revision: 1.5 $
   */
   public class WebClassLoader extends URLClassLoader
   {
       /** This WebClassLoader is associated with this container. */
  -    private Container container;
  +    private ObjectName containerName;
   
       /** The URLs returned by the getURLs() method override */
       private URL[] webURLs;
   
       /** Creates new WebClassLoader. 
           Subclasses must have a constructor with the same signature. */
  -    public WebClassLoader(Container container, UnifiedClassLoader parent)
  +    public WebClassLoader(ObjectName containerName, UnifiedClassLoader parent)
       {
           super(new URL[0], parent);
  -        this.container = container;
  +        this.containerName = containerName;
       }
   
       /** Gets a string key used as the key into the WebServer's loaderMap. */
  @@ -58,10 +57,10 @@
           return key;
       }
   
  -    /** Gets this WebClassLoader's container. */
  -    public Container getContainer()
  +    /** Gets the JMX ObjectName of the WebClassLoader's container. */
  +    public ObjectName getContainer()
       {
  -        return container;
  +        return containerName;
       }
   
       /** Returns the single URL for my parent, an UnifiedClassLoader. */
  @@ -109,7 +108,8 @@
        @return a byte array with the bytecodes for class <code>cls</code>, or
        *       null if this classloader is unable to return such byte array.
        */
  -    public byte[] getBytes(Class clz) {
  +    public byte[] getBytes(Class clz)
  +    {
           return null; // this classloader is unable to return bytecodes
       }
      
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to