User: lqd     
  Date: 02/01/11 04:31:05

  Modified:    src/main/org/jboss/mq Tag: Branch_2_4
                        GenericConnectionFactory.java
  Log:
  Backport of HEAD changes to Branch_2_4:
    - 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
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.3   +17 -10    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.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- GenericConnectionFactory.java     2001/11/28 06:15:27     1.2.2.2
  +++ GenericConnectionFactory.java     2002/01/11 12:31:05     1.2.2.3
  @@ -14,12 +14,14 @@
   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.2.2.2 $
  + * @version    $Revision: 1.2.2.3 $
    */
   public class GenericConnectionFactory implements java.io.Serializable
   {
  @@ -35,18 +37,19 @@
      // These are the keys we look for in the connection properties
      public final static String SERVER_IL_FACTORY_KEY = "ServerILFactory";
      public final static String CLIENT_IL_SERVICE_KEY = "ClientILService";
  -
  -   static org.apache.log4j.Category cat = org.apache.log4j.Category.getInstance( 
GenericConnectionFactory.class );
   
  +   static Logger log = Logger.getLogger( GenericConnectionFactory.class );
   
      /**
       *  The constructor takes a ServerIL and the Connection Properties
  -    *  parameters, The connection properties are allways required since they are
  -    *  used to setup the ClientIL, but the ServerIL can be null if the
  -    *  connection properties defines a ServerILFactory so that the SeverIL can
  -    *  be created on the client side. The ServerIL paramter is usefull for IL
  -    *  such as RMI or the JVM IL since trying to explicity create a connection
  -    *  to them is not strait forward.
  +    *  parameters, The connection properties are allways required since
  +    *  they are used to setup the ClientIL, but the ServerIL can be null
  +    *  if the connection properties defines a ServerILFactory so that
  +    *  the SeverIL can be created on the client side.
  +    *  <p>
  +    *  The ServerIL parameter is useful for ILs such as RMI or the JVM
  +    *  IL since trying to explicity create a connection to them is not
  +    *  straight forward.
       *
       * @param  server  Description of Parameter
       * @param  props   Description of Parameter
  @@ -68,6 +71,10 @@
         String clientILServiceCN = connectionProperties.getProperty( 
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;
      }
   
  @@ -97,7 +104,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