User: user57 Date: 02/02/07 17:06:20 Modified: src/main/org/jboss/system ServiceController.java Log: o logging changes (mostly info -> debug), some fixes for showing exception traces o minor formatting changes (so that really long lines fit into 79 cols) Revision Changes Path 1.24 +18 -9 jboss/src/main/org/jboss/system/ServiceController.java Index: ServiceController.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/system/ServiceController.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- ServiceController.java 20 Jan 2002 15:19:10 -0000 1.23 +++ ServiceController.java 8 Feb 2002 01:06:20 -0000 1.24 @@ -1,9 +1,9 @@ /* -* JBoss, the OpenSource J2EE webOS -* -* Distributable under LGPL license. -* See terms of license at gnu.org. -*/ + * JBoss, the OpenSource J2EE webOS + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ package org.jboss.system; @@ -42,7 +42,7 @@ * @see org.jboss.system.Service * @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a> * @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a> -* @version $Revision: 1.23 $ <p> +* @version $Revision: 1.24 $ <p> * * <b>Revisions:</b> <p> * @@ -235,6 +235,8 @@ */ public synchronized void create(ObjectName serviceName) throws Exception { + boolean debug = log.isDebugEnabled(); + ServiceContext ctx = (ServiceContext) getServiceContext(serviceName); // Get the fancy service proxy (for the lifecycle API) @@ -257,8 +259,11 @@ // A dependent is not created or running if (!(state == ServiceContext.CREATED || state == ServiceContext.RUNNING)) { - - log.info("waiting in create "+serviceName.toString() +" waiting on "+sc.objectName); + if (debug) { + log.debug("waiting in create "+ serviceName + + " waiting on " + sc.objectName); + } + ctx.state=oldState; return; } @@ -289,6 +294,8 @@ */ public synchronized void start(ObjectName serviceName) throws Exception { + boolean debug = log.isDebugEnabled(); + ServiceContext ctx = (ServiceContext) getServiceContext(serviceName); // If we are already started (can happen in dependencies) just return @@ -312,7 +319,9 @@ ObjectName cac = new ObjectName("Test:name=test"); ObjectName ca2 = new ObjectName("Test:name=test"); - log.info("waiting in start "+serviceName.toString()+" on "+sctx.objectName); + if (debug) { + log.debug("waiting in start "+serviceName+" on "+sctx.objectName); + } ctx.state=oldState; return;
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development