User: starksm 
  Date: 02/04/12 13:10:08

  Modified:    src/main/org/jboss/ejb MessageDrivenContainer.java
                        StatefulSessionContainer.java
                        StatelessSessionContainer.java
  Log:
  Cleanup the container plugin references to the container in destory to
  help debug strong references causing leaks
  
  Revision  Changes    Path
  1.19      +7 -4      jboss/src/main/org/jboss/ejb/MessageDrivenContainer.java
  
  Index: MessageDrivenContainer.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/MessageDrivenContainer.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- MessageDrivenContainer.java       15 Feb 2002 00:17:28 -0000      1.18
  +++ MessageDrivenContainer.java       12 Apr 2002 20:10:08 -0000      1.19
  @@ -34,7 +34,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel OConnor</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason Dillon</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>
  - * @version $Revision: 1.18 $
  + * @version $Revision: 1.19 $
    */
   public class MessageDrivenContainer
       extends Container
  @@ -261,22 +261,25 @@
   
           try
           {
  -           // Call default destroy
  -           super.destroy();
  -
              // Destroy container invoker
              containerInvoker.destroy();
  +           containerInvoker.setContainer(null);
   
              // Destroy the pool
              instancePool.destroy();
  +           instancePool.setContainer(null);
   
              // Destroy all the interceptors in the chain
              Interceptor in = interceptor;
              while (in != null)
              {
                 in.destroy();
  +              in.setContainer(null);
                 in = in.getNext();
              }
  +
  +           // Call default destroy
  +           super.destroy();
           }
           finally
           {
  
  
  
  1.45      +11 -4     jboss/src/main/org/jboss/ejb/StatefulSessionContainer.java
  
  Index: StatefulSessionContainer.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/StatefulSessionContainer.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- StatefulSessionContainer.java     5 Mar 2002 18:41:45 -0000       1.44
  +++ StatefulSessionContainer.java     12 Apr 2002 20:10:08 -0000      1.45
  @@ -32,7 +32,7 @@
   * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel OConnor</a>
   * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
   * @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>
  -* @version $Revision: 1.44 $
  +* @version $Revision: 1.45 $
   *
   * <p><b>Revisions</b>
   * <p><b>20010704</b>
  @@ -323,29 +323,36 @@
   
         try
         {
  -         // Call default destroy
  -         super.destroy();
  -
            // Destroy container invoker
            if (containerInvoker != null)
  +         {
               containerInvoker.destroy();
  +            containerInvoker.setContainer(null);
  +         }
   
            // Destroy instance cache
            instanceCache.destroy();
  +         instanceCache.setContainer(null);
   
            // Destroy pool
            instancePool.destroy();
  +         instancePool.setContainer(null);
   
            // Destroy persistence
            persistenceManager.destroy();
  +         persistenceManager.setContainer(null);
   
            // Destroy all the interceptors in the chain
            Interceptor in = interceptor;
            while (in != null)
            {
               in.destroy();
  +            in.setContainer(null);
               in = in.getNext();
            }
  +
  +         // Call default destroy
  +         super.destroy();
         }
         finally
         {
  
  
  
  1.35      +9 -4      jboss/src/main/org/jboss/ejb/StatelessSessionContainer.java
  
  Index: StatelessSessionContainer.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/StatelessSessionContainer.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- StatelessSessionContainer.java    13 Mar 2002 05:13:19 -0000      1.34
  +++ StatelessSessionContainer.java    12 Apr 2002 20:10:08 -0000      1.35
  @@ -32,7 +32,7 @@
   * @author <a href="mailto:[EMAIL PROTECTED]";>Rickard �berg</a>
   * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
   * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel OConnor</a>
  -* @version $Revision: 1.34 $
  +* @version $Revision: 1.35 $
   * <p><b>2001219 marc fleury</b>
   * <ul>
   * <li> move to the new invocation layer and Invocation object
  @@ -264,23 +264,28 @@
   
         try
         {
  -         // Call default destroy
  -         super.destroy();
  -
            // Destroy container invoker
            if (containerInvoker != null)
  +         {
               containerInvoker.destroy();
  +            containerInvoker.setContainer(null);
  +         }
   
            // Destroy the pool
            instancePool.destroy();
  +         instancePool.setContainer(null);
   
            // Destroy all the interceptors in the chain
            Interceptor in = interceptor;
            while (in != null)
            {
               in.destroy();
  +            in.setContainer(null);
               in = in.getNext();
            }
  +
  +         // Call default destroy
  +         super.destroy();
         }
         finally
         {
  
  
  

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

Reply via email to