User: fleury  
  Date: 00/10/18 19:08:43

  Modified:    src/main/org/jboss/ejb/plugins
                        EntityInstanceInterceptor.java
  Log:
  a bad fix
  
  Revision  Changes    Path
  1.20      +8 -8      
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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- EntityInstanceInterceptor.java    2000/10/17 23:45:49     1.19
  +++ EntityInstanceInterceptor.java    2000/10/19 02:08:42     1.20
  @@ -43,7 +43,7 @@
   *   @see <related>
   *   @author Rickard �berg ([EMAIL PROTECTED])
   *   @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.19 $
  +*   @version $Revision: 1.20 $
   */
   public class EntityInstanceInterceptor
   extends AbstractInterceptor
  @@ -118,9 +118,9 @@
          EnterpriseContext ctx = null;
          
          // We synchronize the locking logic (so that the invoke is unsynchronized 
and can be reentrant)
  -       synchronized (mutex)
  -       {
  -         do
  +       do 
  +         {
  +                     synchronized (mutex)
            {
             // Get context
             ctx = cache.get(key);
  @@ -137,7 +137,7 @@
                    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(5000);}
  +                 try{ctx.wait(100);}
                      catch (InterruptedException ie) {}
                 }
                 
  @@ -163,7 +163,7 @@
                               // Possible deadlock
                               Logger.log("LOCKING-WAITING (CTX) for id 
"+ctx.getId()+" ctx.hash "+ctx.hashCode());
                               
  -                            try{ctx.wait(5000);}
  +                            try{ctx.wait(100);}
                                   catch (InterruptedException ie) {}
                           }
                           
  @@ -180,8 +180,8 @@
                 }
             }
                                                                        
  -         } while (ctx == null);
  -       }
  +         }
  +       } while (ctx == null);
            
          // Set context on the method invocation
          mi.setEnterpriseContext(ctx);
  
  
  

Reply via email to