User: salborini
  Date: 00/11/08 12:31:25

  Modified:    src/main/org/jboss/ejb/plugins TxInterceptorBMT.java
  Log:
  Unbind java:comp/UserTransaction on undeploy.
  
  Seems the jnp server keeps track of all bound References, so the
  binding prevented the interceptor (and thus the whole Application)
  to be GC'd after undeploy.
  
  Revision  Changes    Path
  1.9       +13 -1     jboss/src/main/org/jboss/ejb/plugins/TxInterceptorBMT.java
  
  Index: TxInterceptorBMT.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/TxInterceptorBMT.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TxInterceptorBMT.java     2000/10/19 21:21:37     1.8
  +++ TxInterceptorBMT.java     2000/11/08 20:31:25     1.9
  @@ -49,7 +49,7 @@
   *   @see <related>
   *   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
   *   @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
  -*   @version $Revision: 1.8 $
  +*   @version $Revision: 1.9 $
   */
   public class TxInterceptorBMT
   extends AbstractInterceptor
  @@ -101,6 +101,18 @@
                ((Context)new 
InitialContext().lookup("java:comp/")).bind("UserTransaction", ref);
                        
        }
  +
  +    public void stop()
  +    {
  +       try 
  +       {
  +          ((Context)new 
InitialContext().lookup("java:comp/")).unbind("UserTransaction");
  +       }
  +       catch (Exception e)
  +       {
  +          //ignore
  +       }
  +    }
   
       public Object invokeHome(MethodInvocation mi)
       throws Exception
  
  
  

Reply via email to