User: fleury  
  Date: 00/09/27 18:17:11

  Modified:    src/main/org/jboss/tm TxCapsule.java TxManager.java
  Log:
  Update logging
  
  Revision  Changes    Path
  1.8       +12 -12    jboss/src/main/org/jboss/tm/TxCapsule.java
  
  Index: TxCapsule.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/tm/TxCapsule.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TxCapsule.java    2000/09/27 00:28:03     1.7
  +++ TxCapsule.java    2000/09/28 01:17:11     1.8
  @@ -46,7 +46,7 @@
    *  @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
    *  @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a>
    *
  - *  @version $Revision: 1.7 $
  + *  @version $Revision: 1.8 $
    */
   class TxCapsule implements TimeoutTarget
   {
  @@ -186,9 +186,9 @@
                SystemException
      {
         try {
  -         //DEBUG Logger.log("TxCapsule before lock");
  +         //DEBUG Logger.debug("TxCapsule before lock");
                 lock();
  -         //DEBUG Logger.log("TxCapsule after lock status is 
"+getStringStatus(status));
  +         //DEBUG Logger.debug("TxCapsule after lock status is 
"+getStringStatus(status));
                 
            switch (status) {
            case Status.STATUS_PREPARING:
  @@ -215,7 +215,7 @@
               doAfterCompletion();
               throw new RollbackException("Already marked for rollback");
            case Status.STATUS_ACTIVE:
  -                      //DEBUG Logger.log("Commiting tx with status Active");
  +                      //DEBUG Logger.debug("Commiting tx with status Active");
               break;
            default:
               throw new IllegalStateException("Illegal status: " + status);
  @@ -225,21 +225,21 @@
   
            doBeforeCompletion();
   
  -              Logger.log("Before completion is done status is 
"+getStringStatus(status));
  +              Logger.debug("Before completion is done status is 
"+getStringStatus(status));
                 
            if (status == Status.STATUS_ACTIVE) {
               if (resources.size() == 0) {
  -                             //DEBUG Logger.log("no resources 0 phi commit");
  +                             //DEBUG Logger.debug("no resources 0 phi commit");
                  // Zero phase commit is really fast ;-)
                  status = Status.STATUS_COMMITTED;
               } else if (resources.size() == 1) {
  -               // DEBUG Logger.log("1 resource 1 phi commit");
  +               // DEBUG Logger.debug("1 resource 1 phi commit");
                           // One phase commit
                           
                  commitResources(true);
               } else {
                                
  -                             // DEBUG Logger.log("many resources 2 phi commit");
  +                             // DEBUG Logger.debug("many resources 2 phi commit");
                  // Two phase commit
   
                  if (!prepareResources()) {
  @@ -735,9 +735,9 @@
         unlock();
         try {
            for (int i = 0; i < sync.size(); i++) {
  -                     //DEBUG Logger.log("calling beforeCompletion on synch status 
is "+getStringStatus(status));
  +                     //DEBUG Logger.debug("calling beforeCompletion on synch status 
is "+getStringStatus(status));
               ((Synchronization)sync.get(i)).beforeCompletion();
  -                     //DEBUG Logger.log("Done calling beforeCompletion on synch 
status is "+getStringStatus(status));
  +                     //DEBUG Logger.debug("Done calling beforeCompletion on synch 
status is "+getStringStatus(status));
               
                }
         } finally {
  @@ -851,7 +851,7 @@
         boolean readOnly = true;
   
         status = Status.STATUS_PREPARING;
  -      Logger.log("Status Preparing: "+status);
  +      Logger.debug("Status Preparing: "+status);
   
         for (int i = 0; i < resources.size(); i++) {
            // Abort prepare on state change.
  @@ -867,7 +867,7 @@
               try {
                           vote = resource.prepare(xid);
                           
  -               Logger.log("resource vote is "+vote);
  +               Logger.debug("resource vote is "+vote);
                           
               } finally {
                  lock();
  
  
  
  1.17      +8 -8      jboss/src/main/org/jboss/tm/TxManager.java
  
  Index: TxManager.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/tm/TxManager.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TxManager.java    2000/09/26 19:10:22     1.16
  +++ TxManager.java    2000/09/28 01:17:11     1.17
  @@ -31,7 +31,7 @@
   *    @see <related>
   *    @author Rickard �berg ([EMAIL PROTECTED])
   *  @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*    @version $Revision: 1.16 $
  +*    @version $Revision: 1.17 $
   */
   public class TxManager
   implements TransactionManager
  @@ -56,7 +56,7 @@
       SystemException
       {
           try {
  -            Logger.log("begin tx");
  +            Logger.debug("begin tx");
               
               // create tx capsule
               TxCapsule txCap = new TxCapsule(this, timeOut);
  @@ -121,7 +121,7 @@
       public Transaction suspend()
       throws SystemException
       {
  -        //      Logger.log("suspend tx");
  +        //      Logger.debug("suspend tx");
           
           // Useless
           
  @@ -142,7 +142,7 @@
       throws java.lang.IllegalStateException,
       SystemException
       {
  -        //      Logger.log("set rollback only tx");
  +        //      Logger.debug("set rollback only tx");
           getTransaction().setRollbackOnly();
       }
       
  @@ -188,9 +188,9 @@
               javax.naming.InitialContext context = new javax.naming.InitialContext();
               
               //One tx in naming
  -            Logger.log("Calling get manager from JNDI");
  +            Logger.debug("Calling get manager from JNDI");
               TxManager manager = (TxManager) context.lookup("TransactionManager");
  -            Logger.log("Returning TM "+manager.hashCode());
  +            Logger.debug("Returning TM "+manager.hashCode());
               
               return manager;
           
  @@ -213,7 +213,7 @@
       java.lang.IllegalStateException,
       SystemException
       {
  -         Logger.log("txManager commit tx "+tx.hashCode());
  +         Logger.debug("txManager commit tx "+tx.hashCode());
           try {
               // Look up the txCapsule and delegate
               ((TxCapsule) txCapsules.get(tx)).commit();
  @@ -266,7 +266,7 @@
       java.lang.SecurityException,
       SystemException
       {
  -          Logger.log("rollback tx "+tx.hashCode());
  +          Logger.debug("rollback tx "+tx.hashCode());
        
           try {
               // Look up the txCapsule and delegate
  
  
  

Reply via email to