User: simone  
  Date: 00/10/19 14:48:43

  Modified:    src/main/org/jboss/ejb/plugins
                        EntityInstanceInterceptor.java
  Log:
  Cosmetics useful for debugging
  
  Revision  Changes    Path
  1.21      +4 -4      
jboss/src/main/org/jboss/ejb/plugins/EntityInstanceInterceptor.java
  
  Index: EntityInstanceInterceptor.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/EntityInstanceInterceptor.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- EntityInstanceInterceptor.java    2000/10/19 02:08:42     1.20
  +++ EntityInstanceInterceptor.java    2000/10/19 21:48:42     1.21
  @@ -43,7 +43,7 @@
   *   @see <related>
   *   @author Rickard �berg ([EMAIL PROTECTED])
   *   @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.20 $
  +*   @version $Revision: 1.21 $
   */
   public class EntityInstanceInterceptor
   extends AbstractInterceptor
  @@ -126,15 +126,15 @@
             ctx = cache.get(key);
             
             // Do we have a running transaction with the context
  -          if (ctx.getTransaction() != null &&
  +               Transaction tx = ctx.getTransaction();
  +          if (tx != null &&
                 // And are we trying to enter with another transaction
  -              !ctx.getTransaction().equals(mi.getTransaction())) 
  +              !tx.equals(mi.getTransaction())) 
             {
                 // Let's put the thread to sleep a lock release will wake the thread
                 synchronized (ctx)
                 {
                    // Possible deadlock
  -                 Transaction tx = ctx.getTransaction();
                    Logger.log("LOCKING-WAITING (TRANSACTION) for id "+ctx.getId()+" 
ctx.hash "+ctx.hashCode()+" tx:"+((tx == null) ? "null" : tx.toString()));
                    
                    try{ctx.wait(100);}
  
  
  

Reply via email to