You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by ms...@apache.org on 2002/03/22 06:45:39 UTC

cvs commit: jakarta-slide/src/stores/slidestore/j2ee J2EEStore.java

msmith      02/03/21 21:45:39

  Modified:    src/stores/slidestore/j2ee J2EEStore.java
  Log:
  Change most of the INFO level log messages to DEBUG (apart from the ones
  which the user probably _does_ want to see).
  
  Forgot to do this a couple of weeks ago when I said I would.
  
  Revision  Changes    Path
  1.2       +17 -19    jakarta-slide/src/stores/slidestore/j2ee/J2EEStore.java
  
  Index: J2EEStore.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/stores/slidestore/j2ee/J2EEStore.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- J2EEStore.java	25 Feb 2002 00:16:52 -0000	1.1
  +++ J2EEStore.java	22 Mar 2002 05:45:38 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/stores/slidestore/j2ee/J2EEStore.java,v 1.1 2002/02/25 00:16:52 msmith Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/02/25 00:16:52 $
  + * $Header: /home/cvs/jakarta-slide/src/stores/slidestore/j2ee/J2EEStore.java,v 1.2 2002/03/22 05:45:38 msmith Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/03/22 05:45:38 $
    *
    * ====================================================================
    *
  @@ -90,7 +90,7 @@
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
    * @author Ashok Kumar
    * @author <a href="mailto:msmith@apache.org">Michael Smith</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   
   public abstract class J2EEStore
  @@ -142,7 +142,7 @@
       public synchronized void connect()
           throws ServiceConnectionFailedException {
               getLogger().log("Trying connect to database", LOG_CHANNEL, 
  -                    Logger.INFO);
  +                    Logger.DEBUG);
           try {
               globalConnection = ds.getConnection();
           } catch(SQLException e) {
  @@ -150,7 +150,7 @@
                       Logger.ERROR);
           }
           getLogger().log("Done connecting to database. globalConnection is "+
  -                globalConnection, LOG_CHANNEL, Logger.INFO);
  +                globalConnection, LOG_CHANNEL, Logger.DEBUG);
       }
   
       /**
  @@ -255,7 +255,7 @@
       public Xid[] recover(int flag) 
           throws XAException {
           
  -        getLogger().log("recover() for thread: "+Thread.currentThread(), LOG_CHANNEL, Logger.INFO);    
  +        getLogger().log("recover() for thread: "+Thread.currentThread(), LOG_CHANNEL, Logger.DEBUG);    
           TransactionId id = (TransactionId)connectionMap.get(
                   Thread.currentThread());
   
  @@ -271,7 +271,7 @@
       public int prepare(Xid xid) 
           throws XAException {
           
  -        getLogger().log("prepare() for thread: "+Thread.currentThread(), LOG_CHANNEL, Logger.INFO);    
  +        getLogger().log("prepare() for thread: "+Thread.currentThread(), LOG_CHANNEL, Logger.DEBUG);    
           TransactionId id = (TransactionId)connectionMap.get(
                   Thread.currentThread());
   
  @@ -300,7 +300,7 @@
   
       public void forget(Xid xid) throws XAException {
   
  -        getLogger().log("forget() for thread: "+Thread.currentThread(), LOG_CHANNEL, Logger.INFO);    
  +        getLogger().log("forget() for thread: "+Thread.currentThread(), LOG_CHANNEL, Logger.DEBUG);    
           TransactionId id = (TransactionId)connectionMap.get(
                   Thread.currentThread());
   
  @@ -315,13 +315,13 @@
           } catch(SQLException e) {
               getLogger().log("Couldn't close connection.", LOG_CHANNEL, Logger.ERROR);
           }
  -        getLogger().log("forget(): removing from map: "+Thread.currentThread(), LOG_CHANNEL, Logger.INFO);    
  +        getLogger().log("forget(): removing from map: "+Thread.currentThread(), LOG_CHANNEL, Logger.DEBUG);    
           connectionMap.remove(Thread.currentThread()); 
       }
   
       public void end(Xid xid, int flags) throws XAException {
   
  -        getLogger().log("end() for thread: "+Thread.currentThread(), LOG_CHANNEL, Logger.INFO);    
  +        getLogger().log("end() for thread: "+Thread.currentThread(), LOG_CHANNEL, Logger.DEBUG);
           TransactionId id = (TransactionId)connectionMap.get(Thread.currentThread());
           if(id == null || id.xid == null)
               throw new XAException(XAException.XAER_NOTA);
  @@ -345,7 +345,7 @@
           throws XAException {
   
           getLogger().log("commit() for thread "+Thread.currentThread()+", removing from map",
  -                LOG_CHANNEL, Logger.INFO);
  +                LOG_CHANNEL, Logger.DEBUG);
   
           TransactionId id = (TransactionId)connectionMap.remove(
                   Thread.currentThread());
  @@ -393,7 +393,7 @@
           throws XAException {
   
           getLogger().log("rollback() for thread "+Thread.currentThread()+", removing from map",
  -                LOG_CHANNEL, Logger.INFO);
  +                LOG_CHANNEL, Logger.DEBUG);
   
           TransactionId id = (TransactionId)connectionMap.remove(
                   Thread.currentThread());
  @@ -427,7 +427,7 @@
       */
      public void start(Xid xid, int flags)
          throws XAException {
  -           getLogger().log("start(): beginning transaction with xid "+xid, LOG_CHANNEL, Logger.INFO);
  +           getLogger().log("start(): beginning transaction with xid "+xid, LOG_CHANNEL, Logger.DEBUG);
   
          TransactionId id = (TransactionId)connectionMap.get(Thread.currentThread());
   
  @@ -438,7 +438,7 @@
                  id = new TransactionId(xid, TX_IDLE);
   
                  getLogger().log("start(): adding to map for "+Thread.currentThread(),
  -                   LOG_CHANNEL, Logger.INFO);
  +                   LOG_CHANNEL, Logger.DEBUG);
   
                  connectionMap.put(Thread.currentThread(), id);
                  break;
  @@ -481,11 +481,9 @@
   
       protected Connection getCurrentConnection() {
   
  -//        getLogger().log("Getting current connection for thread "+
  -//                Thread.currentThread(), LOG_CHANNEL, Logger.INFO);
           TransactionId id = (TransactionId)connectionMap.get(Thread.currentThread());
           if(id == null) {
  -            getLogger().log("No id for current thread - called outside transaction?", LOG_CHANNEL, Logger.INFO);
  +            getLogger().log("No id for current thread ("+Thread.currentThread()+") - called outside transaction?", LOG_CHANNEL, Logger.INFO);
               return globalConnection;
           }
   
  @@ -496,7 +494,7 @@
               return globalConnection;
           }
   
  -        getLogger().log("Returning current valid connection from map", LOG_CHANNEL, Logger.INFO);
  +        getLogger().log("Returning current valid connection from map", LOG_CHANNEL, Logger.DEBUG);
           return conn;
       }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>