User: user57  
  Date: 01/12/08 21:24:25

  Modified:    src/main/org/jboss/naming NamingService.java
  Log:
   o minor logging changes; trying to make the default configuration less
     verbose on console, enable debug on console
  
  Revision  Changes    Path
  1.23      +14 -7     jboss/src/main/org/jboss/naming/NamingService.java
  
  Index: NamingService.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/naming/NamingService.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- NamingService.java        2001/12/03 02:26:01     1.22
  +++ NamingService.java        2001/12/09 05:24:25     1.23
  @@ -31,7 +31,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Rickard �berg</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>.
    * @author <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.22 $
  + * @version $Revision: 1.23 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -140,6 +140,8 @@
      public void startService()
         throws Exception
      {
  +      boolean debug = log.isDebugEnabled();
  +      
         // Read jndi.properties into system properties
         // RO: this is necessary because some components (=Tomcat servlets) use a 
         // buggy classloader that disallows finding the resource properly
  @@ -152,29 +154,34 @@
         {
            String key = (String) keys.nextElement();
            String value = props.getProperty(key);
  -         log.debug("System.setProperty, key="+key+", value="+value);
  +         if (debug) {
  +            log.debug("System.setProperty, key="+key+", value="+value);
  +         }
            System.setProperty(key, value);
         }
         naming.start();
  +      
         /* Create a default InitialContext and dump out its env to show what 
properties
            were used in its creation. If we find a Context.PROVIDER_URL property
            issue a warning as this means JNDI lookups are going through RMI.
         */
         InitialContext iniCtx = new InitialContext();
         Hashtable env = iniCtx.getEnvironment();
  -      log.info("InitialContext Environment:");
  +      log.debug("InitialContext Environment:");
         String providerURL = null;
         for (Enumeration keys = env.keys(); keys.hasMoreElements(); )
         {
            String key = (String) keys.nextElement();
            String value = (String) env.get(key);
  -         log.info("key="+key+", value="+value);
  +         if (debug) {
  +            log.debug("key="+key+", value="+value);
  +         }
            if( key.equals(Context.PROVIDER_URL) )
               providerURL = value;
         }
         // Warn if there was a Context.PROVIDER_URL
         if( providerURL != null )
  -         log.warn("Saw Context.PROVIDER_URL in server jndi.properties, 
url="+providerURL);
  +         log.warn("Context.PROVIDER_URL in server jndi.properties, 
url="+providerURL);
   
         /* Bind an ObjectFactory to "java:comp" so that "java:comp/env" lookups
          produce a unique context for each thread contexxt ClassLoader that
  @@ -186,13 +193,13 @@
         Reference envRef = new Reference("javax.naming.Context", refAddr, 
ENCFactory.class.getName(), null);
         Context ctx = (Context)iniCtx.lookup("java:");
         ctx.rebind("comp", envRef);
  -      log.info("Naming started on port "+naming.getPort());
  +      log.info("Listening on port "+naming.getPort());
      }
   
      public void stopService()
      {
         naming.stop();
  -      log.info("JNP server stopped");
  +      log.debug("JNP server stopped");
      }
      
      public void postRegister( Boolean pRegistrationDone )
  
  
  

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

Reply via email to