User: lqd     
  Date: 02/01/11 04:27:33

  Modified:    src/main/org/jboss/mq GenericConnectionFactory.java
  Log:
  - use org.jboss.logging.Logger instead of log4j
  - add debug level message when handing out a ClientIL
  - bump log level of "can't connect to server" from debug to error
  
  Revision  Changes    Path
  1.6       +10 -3     jbossmq/src/main/org/jboss/mq/GenericConnectionFactory.java
  
  Index: GenericConnectionFactory.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/GenericConnectionFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- GenericConnectionFactory.java     2001/11/12 05:27:35     1.5
  +++ GenericConnectionFactory.java     2002/01/11 12:27:32     1.6
  @@ -14,15 +14,18 @@
   import org.jboss.mq.il.ServerIL;
   import org.jboss.mq.il.ServerILFactory;
   
  +import org.jboss.logging.Logger;
  +
   /**
    *  The RMI implementation of the DistributedConnectionFactory object
    *
    * @author     Hiram Chirino ([EMAIL PROTECTED])
    * @created    August 16, 2001
  - * @version    $Revision: 1.5 $
  + * @version    $Revision: 1.6 $
    */
   public class GenericConnectionFactory implements java.io.Serializable {
  -   static org.apache.log4j.Category cat = org.apache.log4j.Category.getInstance( 
GenericConnectionFactory.class );
  +
  +   static Logger log = Logger.getLogger( GenericConnectionFactory.class );
   
      // An instance of the ServerIL, once it is setup, we make clones every
      // time a new connection is needed.
  @@ -67,6 +70,10 @@
         String clientILServiceCN = connectionProperties.getProperty( 
ServerILFactory.CLIENT_IL_SERVICE_KEY );
         ClientILService service = ( ClientILService )Class.forName( clientILServiceCN 
).newInstance();
         service.init( connection, connectionProperties );
  +
  +      if ( log.isDebugEnabled() )
  +         log.debug("Handing out ClientIL: " + clientILServiceCN);
  +
         return service;
      }
   
  @@ -96,7 +103,7 @@
            // used to produce multiple connections.
            return server.cloneServerIL();
         } catch ( Exception e ) {
  -         cat.debug( "Could not connect to the server", e );
  +         log.error( "Could not connect to the server", e );
            throw new SpyJMSException( "Could not connect to the server", e );
         }
      }
  
  
  

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

Reply via email to