User: ejort Date: 02/02/09 08:21:33 Modified: src/main/org/jboss/management/j2ee JDBCDataSource.java JNDI.java Log: Guarded info logging. Faster when not interested in life-cycle logging Revision Changes Path 1.7 +5 -3 jboss/src/main/org/jboss/management/j2ee/JDBCDataSource.java Index: JDBCDataSource.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/management/j2ee/JDBCDataSource.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- JDBCDataSource.java 17 Jan 2002 21:57:27 -0000 1.6 +++ JDBCDataSource.java 9 Feb 2002 16:21:33 -0000 1.7 @@ -24,7 +24,7 @@ * {@link javax.management.j2ee.JDBCDataSource JDBCDataSource}. * * @author <a href="mailto:[EMAIL PROTECTED]">Andreas Schaefer</a>. - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * * <p><b>Revisions:</b> * @@ -242,8 +242,10 @@ ); } - public void preDeregister() { - getLog().info( "JDBCDataSource.preDeregister(): " + getName() ); + public void preDeregister() { + Logger log = getLog(); + if (log.isInfoEnabled()) + log.info( "JDBCDataSource.preDeregister(): " + getName() ); sendNotification( new Notification( sTypes[ 1 ], 1.8 +11 -9 jboss/src/main/org/jboss/management/j2ee/JNDI.java Index: JNDI.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/management/j2ee/JNDI.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JNDI.java 10 Dec 2001 06:27:49 -0000 1.7 +++ JNDI.java 9 Feb 2002 16:21:33 -0000 1.8 @@ -1,4 +1,4 @@ -/* +/* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. @@ -22,10 +22,10 @@ * {@link javax.management.j2ee.JNDI JNDI}. * * @author <a href="mailto:[EMAIL PROTECTED]">Andreas Schaefer</a>. - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * * <p><b>Revisions:</b> - * + * * <p><b>20011126 Andreas Schaefer:</b> * <ul> * <li> Adjustments to the JBoss Guidelines @@ -49,7 +49,7 @@ // Static -------------------------------------------------------- - private static final String[] sTypes = new String[] { + private static final String[] sTypes = new String[] { "j2ee.object.created", "j2ee.object.deleted", "state.stopped", @@ -76,7 +76,7 @@ // Now create the JNDI Representant return pServer.createMBean( "org.jboss.management.j2ee.JNDI", - null, + null, new Object[] { pName, lServer, @@ -100,7 +100,7 @@ try { // Find the Object to be destroyed ObjectName lSearch = new ObjectName( - J2EEManagedObject.getDomainName() + ":type=JNDI,name=" + pName + ",*" + J2EEManagedObject.getDomainName() + ":type=JNDI,name=" + pName + ",*" ); ObjectName lJNDI = (ObjectName) pServer.queryNames( lSearch, @@ -126,8 +126,10 @@ MalformedObjectNameException, InvalidParentException { - super( "JNDI", pName, pServer ); - getLog().info( "Service name: " + pService ); + super( "JNDI", pName, pServer ); + Logger log = getLog(); + if (log.isInfoEnabled()) + log.info( "Service name: " + pService ); mService = pService; } @@ -150,7 +152,7 @@ public long getStartTime() { return mStartTime; } - + public int getState() { return mState; }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development