User: patriot1burke
  Date: 01/07/16 21:37:32

  Modified:    src/main/org/jboss/ejb/plugins
                        EntityInstanceInterceptor.java
  Log:
  Fixed bug when ejbLoad threw an exception and threads waiting
  on TxLock did not get awakened.
  
  Revision  Changes    Path
  1.39      +16 -2     
jboss/src/main/org/jboss/ejb/plugins/EntityInstanceInterceptor.java
  
  Index: EntityInstanceInterceptor.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/EntityInstanceInterceptor.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- EntityInstanceInterceptor.java    2001/07/16 23:42:39     1.38
  +++ EntityInstanceInterceptor.java    2001/07/17 04:37:32     1.39
  @@ -60,7 +60,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Bill Burke</a>
  - * @version $Revision: 1.38 $
  + * @version $Revision: 1.39 $
    *
    * <p><b>Revisions:</b><br>
    * <p><b>2001/06/28: marcf</b>
  @@ -84,6 +84,9 @@
    * <ol>
    *   <li>Added wait(timeout) code, commented out so that we can easily turn it on
    *   when this new code is done with it's trial period.
  + *   <li>Fixed bug when ejbLoad threw an exception and threads waiting 
  + *   on TxLock did not get awakened.
  + *   
    * </ol>
    */
   public class EntityInstanceInterceptor
  @@ -382,7 +385,18 @@
                     // Discard instance
                     // EJB 1.1 spec 12.3.1
                     container.getInstanceCache().remove(key);
  -                                             if( trace )
  +                  // Notify all those waiting on TxLock. Since this ctx is not 
TxSynchronized
  +                  // there is nobody else to wake up waiting threads.
  +                  if (ctx.getTransaction() != null 
  +                      && ctx.getTransaction().equals(mi.getTransaction()))
  +                  {
  +                     ctx.setTransaction(null);
  +                     synchronized(ctx.getTxLock())
  +                     {
  +                        ctx.getTxLock().notifyAll();
  +                     }
  +                  }
  +                  if( trace )
                        log.trace("Ending invoke, exceptionThrown, ctx="+ctx);
                  }
                                        
  
  
  

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

Reply via email to