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

  Modified:    src/main/org/jboss/ejb/plugins AbstractInstancePool.java
                        BMPPersistenceManager.java
                        CMPFilePersistenceManager.java
                        CMPPersistenceManager.java
                        EntityInstanceInterceptor.java
                        EntitySynchronizationInterceptor.java
                        LogInterceptor.java
                        NoPassivationEntityInstanceCache.java
                        NoPassivationStatefulSessionInstanceCache.java
                        RandomEntityInstanceCache.java
                        StatefulSessionFilePersistenceManager.java
                        StatefulSessionInstanceInterceptor.java
                        TxInterceptorBMT.java TxInterceptorCMT.java
  Log:
  Update logging
  
  Revision  Changes    Path
  1.4       +3 -3      jboss/src/main/org/jboss/ejb/plugins/AbstractInstancePool.java
  
  Index: AbstractInstancePool.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/AbstractInstancePool.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractInstancePool.java 2000/08/18 03:20:56     1.3
  +++ AbstractInstancePool.java 2000/09/28 01:17:00     1.4
  @@ -31,7 +31,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
    */
   public abstract class AbstractInstancePool
      implements InstancePool, XmlLoadable
  @@ -94,7 +94,7 @@
      public synchronized EnterpriseContext get()
         throws RemoteException
      {
  -//      Logger.log("Get instance "+this);
  +      Logger.debug("Get instance "+this);
         
         if (!pool.empty())
         {
  @@ -126,7 +126,7 @@
      public synchronized void free(EnterpriseContext ctx)
      {
         // Pool it
  -//      Logger.log("Free instance:"+ctx.getId()+"#"+ctx.getTransaction());
  +      Logger.debug("Free instance:"+ctx.getId()+"#"+ctx.getTransaction());
         
         if (pool.size() < maxSize)
         {
  
  
  
  1.12      +2 -2      jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java
  
  Index: BMPPersistenceManager.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- BMPPersistenceManager.java        2000/09/27 23:10:52     1.11
  +++ BMPPersistenceManager.java        2000/09/28 01:17:00     1.12
  @@ -33,7 +33,7 @@
   *   @see <related>
   *   @author Rickard �berg ([EMAIL PROTECTED])
   *  @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.11 $
  +*   @version $Revision: 1.12 $
   */
   public class BMPPersistenceManager
   implements EntityPersistenceManager
  @@ -222,7 +222,7 @@
       public void storeEntity(EntityEnterpriseContext ctx)
       throws RemoteException
       {
  -       //      Logger.log("Store entity");
  +       Logger.debug("Store entity");
          try
          {
            ejbStore.invoke(ctx.getInstance(), new Object[0]);
  
  
  
  1.5       +6 -6      
jboss/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java
  
  Index: CMPFilePersistenceManager.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CMPFilePersistenceManager.java    2000/08/18 03:20:56     1.4
  +++ CMPFilePersistenceManager.java    2000/09/28 01:17:00     1.5
  @@ -42,7 +42,7 @@
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
    *  @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  - *   @version $Revision: 1.4 $
  + *   @version $Revision: 1.5 $
    */
   public class CMPFilePersistenceManager
      implements EntityPersistenceStore
  @@ -142,18 +142,18 @@
      {
         if (finderMethod.getName().equals("findAll"))
         {
  -      //         Logger.log("Find all entities");
  +      //         Logger.debug("Find all entities");
            
            String[] files = dir.list();
            ArrayList result = new ArrayList();
            for (int i = 0; i < files.length; i++)
               if (files[i].endsWith(".ser"))
               {
  -//               Logger.log("Found entity");
  +//               Logger.debug("Found entity");
                  result.add(files[i].substring(0,files[i].length()-4));
               }
               
  -//         Logger.log("Find all entities done");
  +//         Logger.debug("Find all entities done");
            return result;
         } else
         {
  @@ -215,7 +215,7 @@
      public void storeEntity(EntityEnterpriseContext ctx)
         throws RemoteException
      {
  -//      Logger.log("Store entity");
  +//      Logger.debug("Store entity");
        
           storeEntity(ctx.getId(), ctx.getInstance());
      }
  @@ -233,7 +233,7 @@
         // Remove file
         if (!getFile(ctx.getId()).delete())
            throw new RemoveException("Could not remove file:"+getFile(ctx.getId()));
  -//      Logger.log("Removed file for"+ctx.getId());
  +//      Logger.debug("Removed file for"+ctx.getId());
      }
      
      // Z implementation ----------------------------------------------
  
  
  
  1.9       +4 -5      jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java
  
  Index: CMPPersistenceManager.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CMPPersistenceManager.java        2000/09/27 17:06:09     1.8
  +++ CMPPersistenceManager.java        2000/09/28 01:17:01     1.9
  @@ -35,7 +35,7 @@
   *      
   *   @see <related>
   *   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.8 $
  +*   @version $Revision: 1.9 $
   */
   public class CMPPersistenceManager
   implements EntityPersistenceManager {
  @@ -122,10 +122,9 @@
               // Give it to the context
               ctx.setCacheKey(cacheKey);
            
  +             // insert instance in cache, it is safe
  +             ((EntityInstanceCache) con.getInstanceCache()).insert(ctx);
            
  -            // insert instance in cache, it is safe
  -            ((EntityInstanceCache) con.getInstanceCache()).insert(ctx);
  -         
               // Create EJBObject
               
ctx.setEJBObject(con.getContainerInvoker().getEntityEJBObject(cacheKey));
               
  @@ -215,7 +214,7 @@
       
       public void storeEntity(EntityEnterpriseContext ctx)
       throws RemoteException {
  -        //      Logger.log("Store entity");
  +        //      Logger.debug("Store entity");
           try {
               
               // Prepare the instance for storage
  
  
  
  1.12      +3 -3      
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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- EntityInstanceInterceptor.java    2000/09/27 01:01:11     1.11
  +++ EntityInstanceInterceptor.java    2000/09/28 01:17:01     1.12
  @@ -42,7 +42,7 @@
   *   @see <related>
   *   @author Rickard �berg ([EMAIL PROTECTED])
   *   @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.11 $
  +*   @version $Revision: 1.12 $
   */
   public class EntityInstanceInterceptor
   extends AbstractInterceptor
  @@ -94,7 +94,7 @@
                        } 
                        else
                        {
  -                             // DEBUG           Logger.log("Entity was created; not 
returned to pool");
  +                             // DEBUG           Logger.debug("Entity was created; 
not returned to pool");
                                synchronized (ctx) {
                                        
                                        //Let the waiters know
  @@ -201,7 +201,7 @@
                        throw e;
                } finally
                {
  -                     //         Logger.log("Release instance for "+id);
  +                     //         Logger.debug("Release instance for "+id);
                        if (ctx != null)
                        {
                                
  
  
  
  1.18      +6 -6      
jboss/src/main/org/jboss/ejb/plugins/EntitySynchronizationInterceptor.java
  
  Index: EntitySynchronizationInterceptor.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/EntitySynchronizationInterceptor.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- EntitySynchronizationInterceptor.java     2000/09/27 00:35:24     1.17
  +++ EntitySynchronizationInterceptor.java     2000/09/28 01:17:01     1.18
  @@ -48,7 +48,7 @@
   *   @see <related>
   *   @author Rickard �berg ([EMAIL PROTECTED])
   *   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.17 $
  +*   @version $Revision: 1.18 $
   */
   public class EntitySynchronizationInterceptor
   extends AbstractInterceptor
  @@ -207,7 +207,7 @@
                }
                
                // So we can go on with the invocation
  -             Logger.log("Tx is "+ ((tx == null)? "null" : tx.toString()));
  +             Logger.debug("Tx is "+ ((tx == null)? "null" : tx.toString()));
                
                // Invocation with a running Transaction
                
  @@ -304,7 +304,7 @@
                
                public void beforeCompletion()
                {
  -                     // DEBUG Logger.log("beforeCompletion called for ctx 
"+ctx.hashCode());
  +                     // DEBUG Logger.debug("beforeCompletion called for ctx 
"+ctx.hashCode());
                        
                        if (ctx.getId() != null) {
                                try {
  @@ -316,9 +316,9 @@
                                                // Store instance if business method 
was invoked
                                                if (ctx.isInvoked())  {
                                                        
  -                                                     //DEBUG 
Logger.log("EntitySynchronization sync calling store on ctx "+ctx.hashCode());
  +                                                     //DEBUG 
Logger.debug("EntitySynchronization sync calling store on ctx "+ctx.hashCode());
                                                        
  -                                                     
Logger.log("EntitySynchronization sync calling store on ctx "+ctx.hashCode());
  +                                                     
Logger.debug("EntitySynchronization sync calling store on ctx "+ctx.hashCode());
                                                        
                                                        
container.getPersistenceManager().storeEntity(ctx);
                                                }
  @@ -342,7 +342,7 @@
                {
                        if (ctx.getId() != null) {
                                
  -                             //DEBUG Logger.log("afterCompletion called for ctx 
"+ctx.hashCode());
  +                             //DEBUG Logger.debug("afterCompletion called for ctx 
"+ctx.hashCode());
                                
                                // If rolled back -> invalidate instance
                                if (status == Status.STATUS_ROLLEDBACK) {
  
  
  
  1.8       +3 -2      jboss/src/main/org/jboss/ejb/plugins/LogInterceptor.java
  
  Index: LogInterceptor.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/LogInterceptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- LogInterceptor.java       2000/08/18 03:20:56     1.7
  +++ LogInterceptor.java       2000/09/28 01:17:01     1.8
  @@ -33,7 +33,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.7 $
  + *   @version $Revision: 1.8 $
    */
   public class LogInterceptor
      extends AbstractInterceptor
  @@ -156,7 +156,8 @@
            return getNext().invoke(mi);
         } catch (Exception e)
         {
  -         //DEBUG log.exception(e);
  +         // RO TODO: make a finer grained exception logging, the app stuff needs to 
go through and the server stuff needs to be logged
  +              log.exception(e);
            if (e.getMessage() != null)
            log.log(e.getMessage());
            throw e;
  
  
  
  1.13      +4 -3      
jboss/src/main/org/jboss/ejb/plugins/NoPassivationEntityInstanceCache.java
  
  Index: NoPassivationEntityInstanceCache.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/NoPassivationEntityInstanceCache.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- NoPassivationEntityInstanceCache.java     2000/09/27 01:01:12     1.12
  +++ NoPassivationEntityInstanceCache.java     2000/09/28 01:17:01     1.13
  @@ -29,6 +29,7 @@
   import org.jboss.ejb.CacheKey;
   
   import org.jboss.metadata.EntityMetaData;
  +import org.jboss.logging.Logger;
   
   /**
   *    <description> 
  @@ -37,7 +38,7 @@
   *    @author Rickard �berg ([EMAIL PROTECTED])
   *   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
   *   @author <a href="mailto:[EMAIL PROTECTED]">Andy Schaefer</a>
  -*    @version $Revision: 1.12 $
  +*    @version $Revision: 1.13 $
   */
   public class NoPassivationEntityInstanceCache
   implements EntityInstanceCache
  @@ -102,7 +103,7 @@
           // Use the CacheKey for the rest of the method
           CacheKey cacheKey = (CacheKey) id;
                
  -             System.out.println("Get "+cacheKey+" from cache");
  +             Logger.debug("Get "+cacheKey+" from cache");
           
           EntityEnterpriseContext ctx;
         
  @@ -131,7 +132,7 @@
          // Tell the context the key 
          ctx.setCacheKey(cacheKey);
          
  -        // DEBUG Logger.log("Got entity:"+ctx.getId());
  +        // DEBUG Logger.debug("Got entity:"+ctx.getId());
          
           return ctx;
       }
  
  
  
  1.11      +3 -3      
jboss/src/main/org/jboss/ejb/plugins/NoPassivationStatefulSessionInstanceCache.java
  
  Index: NoPassivationStatefulSessionInstanceCache.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/NoPassivationStatefulSessionInstanceCache.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- NoPassivationStatefulSessionInstanceCache.java    2000/09/26 20:18:51     1.10
  +++ NoPassivationStatefulSessionInstanceCache.java    2000/09/28 01:17:01     1.11
  @@ -32,7 +32,7 @@
   *    @see <related>
   *    @author Rickard �berg ([EMAIL PROTECTED])
   *   @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
  -*    @version $Revision: 1.10 $
  +*    @version $Revision: 1.11 $
   */
   public class NoPassivationStatefulSessionInstanceCache
   implements InstanceCache
  @@ -83,8 +83,8 @@
       throws RemoteException
       {
          
  -        //DEBUG Logger.log("Stateful cache looking for ID "+id);
  -        Logger.log("Stateful cache looking for ID "+id);
  +        //DEBUG Logger.debug("Stateful cache looking for ID "+id);
  +        Logger.debug("Stateful cache looking for ID "+id);
        
          // Do we have the context in cache?
          StatefulSessionEnterpriseContext ctx = 
  
  
  
  1.10      +5 -5      
jboss/src/main/org/jboss/ejb/plugins/RandomEntityInstanceCache.java
  
  Index: RandomEntityInstanceCache.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/RandomEntityInstanceCache.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- RandomEntityInstanceCache.java    2000/09/26 20:18:51     1.9
  +++ RandomEntityInstanceCache.java    2000/09/28 01:17:01     1.10
  @@ -29,7 +29,7 @@
   *    @see <related>
   *    @author Rickard �berg ([EMAIL PROTECTED])
   *  @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*    @version $Revision: 1.9 $
  +*    @version $Revision: 1.10 $
   */
   public class RandomEntityInstanceCache
   extends NoPassivationEntityInstanceCache
  @@ -81,7 +81,7 @@
            // Passivation loop
            while(running)
            {
  -          //            Logger.log("Clearing cache");
  +          //            Logger.debug("Clearing cache");
             // Passivate old. Lock cache first
             //synchronized(RandomEntityInstanceCache.this)
             synchronized(cache)
  @@ -127,7 +127,7 @@
                                   currentActive--;
                      }
                       
  -                   catch (Exception e) { Logger.log("Could not passivate 
instance");}
  +                   catch (Exception e) { Logger.warning("Could not passivate 
instance");}
                    
                      // Are we done?
                      if (currentActive == minActive) break;
  @@ -135,8 +135,8 @@
                 
                 }    
             }  
  -          // DEBUG Logger.log("Passivation done");
  -                Logger.log("Passivation done");
  +          // DEBUG Logger.debug("Passivation done");
  +                Logger.debug("Passivation done");
             
             // Sleep
             try
  
  
  
  1.10      +3 -3      
jboss/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java
  
  Index: StatefulSessionFilePersistenceManager.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StatefulSessionFilePersistenceManager.java        2000/09/27 17:06:09     1.9
  +++ StatefulSessionFilePersistenceManager.java        2000/09/28 01:17:01     1.10
  @@ -60,7 +60,7 @@
    *  @see <related>
    *  @author Rickard �berg ([EMAIL PROTECTED])
    *  @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
  - *  @version $Revision: 1.9 $
  + *  @version $Revision: 1.10 $
    */
   public class StatefulSessionFilePersistenceManager
      implements StatefulSessionPersistenceManager
  @@ -106,7 +106,7 @@
            
          dir.mkdirs();
          
  -       Logger.log("Storing sessions for "+ejbName+" in:"+dir);
  +       Logger.debug("Storing sessions for "+ejbName+" in:"+dir);
         
          // Clear dir of old files
          File[] sessions = dir.listFiles();
  @@ -114,7 +114,7 @@
          {
            sessions[i].delete();
          }
  -       Logger.log(sessions.length + " old sessions removed");
  +       Logger.debug(sessions.length + " old sessions removed");
      }
      
      public void start()
  
  
  
  1.8       +3 -3      
jboss/src/main/org/jboss/ejb/plugins/StatefulSessionInstanceInterceptor.java
  
  Index: StatefulSessionInstanceInterceptor.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/StatefulSessionInstanceInterceptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StatefulSessionInstanceInterceptor.java   2000/09/27 01:01:12     1.7
  +++ StatefulSessionInstanceInterceptor.java   2000/09/28 01:17:02     1.8
  @@ -32,7 +32,7 @@
   *   @see <related>
   *   @author Rickard �berg ([EMAIL PROTECTED])
   *   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.7 $
  +*   @version $Revision: 1.8 $
   */
   public class StatefulSessionInstanceInterceptor
   extends AbstractInterceptor
  @@ -261,7 +261,7 @@
                
                public void beforeCompletion()
                {
  -                     // DEBUG Logger.log("beforeCompletion called");
  +                     // DEBUG Logger.debug("beforeCompletion called");
                        
                        // lock the context the transaction is being commited (no need 
for sync)
                        ctx.lock();
  @@ -277,7 +277,7 @@
                
                public void afterCompletion(int status)
                {
  -                     // DEBUG Logger.log("afterCompletion called");
  +                     // DEBUG Logger.debug("afterCompletion called");
                        
                        // finish the transaction association
                        ctx.setTransaction(null);
  
  
  
  1.3       +9 -9      jboss/src/main/org/jboss/ejb/plugins/TxInterceptorBMT.java
  
  Index: TxInterceptorBMT.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/TxInterceptorBMT.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TxInterceptorBMT.java     2000/09/26 22:37:15     1.2
  +++ TxInterceptorBMT.java     2000/09/28 01:17:02     1.3
  @@ -49,7 +49,7 @@
   *   @see <related>
   *   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
   *   @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
  -*   @version $Revision: 1.2 $
  +*   @version $Revision: 1.3 $
   */
   public class TxInterceptorBMT
   extends AbstractInterceptor
  @@ -187,14 +187,14 @@
                // this is necessary for optimized (inVM) calls: threads come 
associated with the client transaction
           Transaction t1 = tm.disassociateThread();
                
  -             // DEBUG Logger.log("TxInterceptorBMT disassociate" + ((t1==null) ? 
"null": Integer.toString(t1.hashCode())));
  -             Logger.log("TxInterceptorBMT disassociate" + ((t1==null) ? "null": 
Integer.toString(t1.hashCode())));
  +             // DEBUG Logger.debug("TxInterceptorBMT disassociate" + ((t1==null) ? 
"null": Integer.toString(t1.hashCode())));
  +             Logger.debug("TxInterceptorBMT disassociate" + ((t1==null) ? "null": 
Integer.toString(t1.hashCode())));
                
           // t2 refers to the instance transaction (spec ejb1.1, 11.6.1, p174) 
           Transaction t2 = mi.getEnterpriseContext().getTransaction();
           
  -             // DEBUG Logger.log("TxInterceptorBMT t2 in context" + ((t2==null) ? 
"null": Integer.toString(t2.hashCode())));
  -             Logger.log("TxInterceptorBMT t2 in context" + ((t2==null) ? "null": 
Integer.toString(t2.hashCode())));
  +             // DEBUG Logger.debug("TxInterceptorBMT t2 in context" + ((t2==null) ? 
"null": Integer.toString(t2.hashCode())));
  +             Logger.debug("TxInterceptorBMT t2 in context" + ((t2==null) ? "null": 
Integer.toString(t2.hashCode())));
                
           try {
                        
  @@ -214,8 +214,8 @@
                        
                        if (t1 != null) {
                                
  -                             // DEBUG Logger.log("TxInterceptorBMT reassociating 
client tx " + t1.hashCode());
  -                             Logger.log("TxInterceptorBMT reassociating client tx " 
+ t1.hashCode());
  +                             // DEBUG Logger.debug("TxInterceptorBMT reassociating 
client tx " + t1.hashCode());
  +                             Logger.debug("TxInterceptorBMT reassociating client tx 
" + t1.hashCode());
                                
                                // reassociate the previous transaction before 
returning
                                tm.associateThread(t1);
  @@ -227,7 +227,7 @@
                                // t3 is the transaction associated with the context 
at the end of the call
                                Transaction t3 = 
mi.getEnterpriseContext().getTransaction();
                                
  -                             Logger.log("in TxIntBMT " + t3);
  +                             Logger.debug("in TxIntBMT " + t3);
                                
                                // for a stateless sessionbean the transaction should 
be completed at the end of the call
                            if (t3 != null) switch (t3.getStatus()) {
  @@ -242,7 +242,7 @@
                                        case Status.STATUS_PREPARED: 
                                
                                                // cf ejb1.1 11.6.1
  -                                             Logger.log("Application error: CMT 
stateless bean " + container.getBeanMetaData().getEjbName() + " should complete 
transactions before returning (ejb1.1 spec, 11.6.1)");
  +                                             Logger.debug("Application error: CMT 
stateless bean " + container.getBeanMetaData().getEjbName() + " should complete 
transactions before returning (ejb1.1 spec, 11.6.1)");
                                            
                                                // the instance interceptor will 
discard the instance
                                                throw new RemoteException("Application 
error: CMT stateless bean " + container.getBeanMetaData().getEjbName() + " should 
complete transactions before returning (ejb1.1 spec, 11.6.1)");
  
  
  
  1.3       +8 -8      jboss/src/main/org/jboss/ejb/plugins/TxInterceptorCMT.java
  
  Index: TxInterceptorCMT.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/TxInterceptorCMT.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TxInterceptorCMT.java     2000/09/26 20:18:51     1.2
  +++ TxInterceptorCMT.java     2000/09/28 01:17:02     1.3
  @@ -39,7 +39,7 @@
   *   @author Rickard �berg ([EMAIL PROTECTED])
   *   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
   *   @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
  -*   @version $Revision: 1.2 $
  +*   @version $Revision: 1.3 $
   */
   public class TxInterceptorCMT
   extends AbstractInterceptor
  @@ -149,8 +149,8 @@
           // New transaction is the new transaction this might start
           Transaction newTransaction = null;
           
  -        //DEBUG       Logger.log("Current transaction in MI is 
"+mi.getTransaction()); 
  -        //DEBUG       Logger.log("Current method "+mi.getMethod().getName());       
    
  +        //DEBUG       Logger.debug("Current transaction in MI is 
"+mi.getTransaction()); 
  +        //DEBUG       Logger.debug("Current method "+mi.getMethod().getName());     
      
           byte transType = getTransactionMethod(mi.getMethod(), remoteInvocation);
           
           printMethod(mi.getMethod(), transType);
  @@ -239,8 +239,8 @@
                       
                       finally {
                           
  -                        //DEBUG Logger.log("TxInterceptorCMT: in finally");
  -                        Logger.log("TxInterceptorCMT: In finally");
  +                        //DEBUG Logger.debug("TxInterceptorCMT: in finally");
  +                        Logger.debug("TxInterceptorCMT: In finally");
                           
                           // Only do something if we started the transaction
                           if (newTransaction != null) {
  @@ -259,9 +259,9 @@
                                   // This will happen if
                                   // a) everything goes well
                                   // b) app. exception was thrown
  -                                Logger.log("TxInterceptorCMT:before commit");
  +                                Logger.debug("TxInterceptorCMT:before commit");
                                   newTransaction.commit();
  -                                Logger.log("TxInterceptorCMT:after commit");
  +                                Logger.debug("TxInterceptorCMT:after commit");
                               
                               }
                               
  @@ -413,7 +413,7 @@
           if(b != null) return b.byteValue();
               
           BeanMetaData bmd = container.getBeanMetaData();
  -        //DEBUG Logger.log("Found metadata for bean '"+bmd.getEjbName()+"'"+" 
method is "+m.getName());
  +        //DEBUG Logger.debug("Found metadata for bean '"+bmd.getEjbName()+"'"+" 
method is "+m.getName());
           byte result = bmd.getMethodTransactionType(m.getName(), 
m.getParameterTypes(), remoteInvocation);
           
           // provide default if method is not found in descriptor 
  
  
  

Reply via email to