User: mnf999  
  Date: 01/07/03 15:38:27

  Modified:    src/main/org/jboss/ejb EnterpriseContext.java
  Log:
  Adding the ctLock to the Enterprise, this is probably needed at the session level 
but for now present only in the transaction.
  
  The goal of this is to allow for fine locking than previously.  A transactional lock 
will be done on the ctx.txLock only.  We should consider making these fields public 
and not having to get them every time
  
  Revision  Changes    Path
  1.36      +12 -1     jboss/src/main/org/jboss/ejb/EnterpriseContext.java
  
  Index: EnterpriseContext.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/EnterpriseContext.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- EnterpriseContext.java    2001/06/22 03:58:55     1.35
  +++ EnterpriseContext.java    2001/07/03 22:38:27     1.36
  @@ -46,7 +46,11 @@
    *  @author <a href="mailto:[EMAIL PROTECTED]";>Sebastien Alborini</a>
    *  @author <a href="mailto:[EMAIL PROTECTED]";>Juha Lindfors</a>
    *  @author <a href="mailto:[EMAIL PROTECTED]";>Ole Husgaard</a>
  - *  @version $Revision: 1.35 $
  + *  @version $Revision: 1.36 $
  + *
  + *  Revisions:
  + *  2001/06/29: marcf
  + *           - Added txLock to permit locking and most of all notifying on tx 
demarcation only
    */
   public abstract class EnterpriseContext
   {
  @@ -76,6 +80,9 @@
      
      // The instance is being used.  This locks it's state
      int locked = 0;  
  +     
  +     // The instance is used in a transaction, synchronized methods on the tx
  +     Object txLock = new Object();
                     
      // Static --------------------------------------------------------
      
  @@ -114,6 +121,10 @@
          return id; 
       }
   
  +     public Object getTxLock() {
  +             return txLock;
  +     }
  +     
      public void setTransaction(Transaction transaction) {
          
   //DEBUG       Logger.debug("EnterpriseContext.setTransaction "+((transaction == 
null) ? "null" : Integer.toString(transaction.hashCode()))); 
  
  
  

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

Reply via email to