User: ejort
Date: 02/01/05 04:08:53
Modified: src/main/org/jboss/naming ExternalContext.java
NamingService.java
Log:
Guarded debug logging
Revision Changes Path
1.12 +10 -5 jboss/src/main/org/jboss/naming/ExternalContext.java
Index: ExternalContext.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/naming/ExternalContext.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ExternalContext.java 2001/11/12 06:52:17 1.11
+++ ExternalContext.java 2002/01/05 12:08:53 1.12
@@ -44,7 +44,7 @@
@see org.jboss.naming.NonSerializableFactory
@author [EMAIL PROTECTED]
-@version $Revision: 1.11 $
+@version $Revision: 1.12 $
*/
public class ExternalContext extends ServiceMBeanSupport implements
ExternalContextMBean
{
@@ -185,21 +185,26 @@
private void rebind() throws Exception
{
+ boolean debug = log.isDebugEnabled();
Context ctx = contextInfo.newContext();
Context rootCtx = (Context) new InitialContext();
- log.debug("ctx="+ctx+", env="+ctx.getEnvironment());
+ if (debug)
+ log.debug("ctx="+ctx+", env="+ctx.getEnvironment());
// Get the parent context into which we are to bind
String jndiName = contextInfo.getJndiName();
Name fullName = rootCtx.getNameParser("").parse(jndiName);
- log.debug("fullName="+fullName);
+ if (debug)
+ log.debug("fullName="+fullName);
Name parentName = fullName;
if( fullName.size() > 1 )
parentName = fullName.getPrefix(fullName.size()-1);
else
parentName = new CompositeName();
- log.debug("parentName="+parentName);
+ if (debug)
+ log.debug("parentName="+parentName);
Context parentCtx = createContext(rootCtx, parentName);
- log.debug("parentCtx="+parentCtx);
+ if (debug)
+ log.debug("parentCtx="+parentCtx);
Name atomName = fullName.getSuffix(fullName.size()-1);
String atom = atomName.get(0);
boolean cacheContext = contextInfo.getCacheContext();
1.24 +3 -2 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.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- NamingService.java 2001/12/09 05:24:25 1.23
+++ NamingService.java 2002/01/05 12:08:53 1.24
@@ -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.23 $
+ * @version $Revision: 1.24 $
*
* <p><b>Revisions:</b>
*
@@ -167,7 +167,8 @@
*/
InitialContext iniCtx = new InitialContext();
Hashtable env = iniCtx.getEnvironment();
- log.debug("InitialContext Environment:");
+ if (debug)
+ log.debug("InitialContext Environment:");
String providerURL = null;
for (Enumeration keys = env.keys(); keys.hasMoreElements(); )
{
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development