User: starksm
Date: 01/11/20 01:42:55
Modified: src/main/org/jboss/naming Tag: Branch_2_4
ExternalContext.java JNDIView.java
NamingService.java
Log:
Change to the unified log4j based org.jboss.logging.Logger class.
Revision Changes Path
No revision
No revision
1.5.4.1 +2 -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.5
retrieving revision 1.5.4.1
diff -u -r1.5 -r1.5.4.1
--- ExternalContext.java 2001/04/21 05:59:05 1.5
+++ ExternalContext.java 2001/11/20 09:42:55 1.5.4.1
@@ -33,9 +33,6 @@
import javax.naming.ldap.Control;
import javax.naming.spi.ObjectFactory;
-import org.jnp.server.Main;
-
-import org.jboss.logging.Log;
import org.jboss.util.ServiceMBeanSupport;
/** A MBean that binds an arbitrary InitialContext into the JBoss default
@@ -47,7 +44,7 @@
@see org.jboss.naming.NonSerializableFactory
@author [EMAIL PROTECTED]
-@version $Revision: 1.5 $
+@version $Revision: 1.5.4.1 $
*/
public class ExternalContext extends ServiceMBeanSupport implements
ExternalContextMBean
{
@@ -259,7 +256,7 @@
}
catch(NamingException e)
{
- log.exception(e);
+ log.error("unbind failed", e);
}
}
1.4.2.1 +7 -8 jboss/src/main/org/jboss/naming/JNDIView.java
Index: JNDIView.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/naming/JNDIView.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- JNDIView.java 2001/06/16 05:53:38 1.4
+++ JNDIView.java 2001/11/20 09:42:55 1.4.2.1
@@ -25,7 +25,6 @@
import org.jboss.ejb.Application;
import org.jboss.ejb.Container;
import org.jboss.ejb.ContainerFactoryMBean;
-import org.jboss.logging.Log;
import org.jboss.util.ServiceMBeanSupport;
/** A simple utlity mbean that allows one to recursively list the default
@@ -37,7 +36,7 @@
@author [EMAIL PROTECTED]
@author Vladimir Blagojevic <[EMAIL PROTECTED]>
-@version $Revision: 1.4 $
+@version $Revision: 1.4.2.1 $
*/
public class JNDIView extends ServiceMBeanSupport implements JNDIViewMBean
{
@@ -78,7 +77,7 @@
}
catch(Exception e)
{
- log.exception(e);
+ log.warn("Failed to getDeployedApplications", e);
buffer.append("Failed to getDeployedApplications\n");
formatException(buffer, e);
buffer.insert(0, "<pre>");
@@ -133,7 +132,7 @@
}
catch(NamingException e)
{
- log.exception(e);
+ log.warn("Failed to InitialContext", e);
buffer.append("Failed to get InitialContext, "+e.toString(true));
formatException(buffer, e);
}
@@ -149,7 +148,7 @@
}
catch(NamingException e)
{
- log.exception(e);
+ log.warn("Failed to InitialContext", e);
buffer.append("Failed to get InitialContext, "+e.toString(true));
formatException(buffer, e);
}
@@ -182,7 +181,7 @@
}
catch(Exception e)
{
- log.exception(e);
+ log.warn("Failed to getDeployedApplications", e);
buffer.append( "<jndi>" );
buffer.append( "<error>" );
buffer.append( '\n' );
@@ -260,7 +259,7 @@
}
catch(NamingException e)
{
- log.exception(e);
+ log.warn("Failed to get getDeployedApplications", e);
buffer.append( "<error>" );
buffer.append( '\n' );
buffer.append( "<message>" + "Failed to get InitialContext, " +
e.toString( true ) + "</message>" );
@@ -283,7 +282,7 @@
}
catch(NamingException e)
{
- log.exception(e);
+ log.warn("Failed to get InitialContext", e);
buffer.append( "<error>" );
buffer.append( '\n' );
buffer.append( "<message>" + "Failed to get InitialContext, " +
e.toString( true ) + "</message>" );
1.11.4.4 +9 -10 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.11.4.3
retrieving revision 1.11.4.4
diff -u -r1.11.4.3 -r1.11.4.4
--- NamingService.java 2001/09/07 01:31:34 1.11.4.3
+++ NamingService.java 2001/11/20 09:42:55 1.11.4.4
@@ -22,14 +22,13 @@
import org.jnp.server.Main;
-import org.jboss.logging.Log;
import org.jboss.util.ServiceMBeanSupport;
/** A JBoss service that starts the jnp JNDI server.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Rickard �berg</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a>.
- * @version $Revision: 1.11.4.3 $
+ * @version $Revision: 1.11.4.4 $
*
* Revisions:
* 20010622 scott.stark: Report IntialContext env for problem tracing
@@ -48,10 +47,10 @@
// Constructors --------------------------------------------------
public NamingService()
{
- String categoryName = category.getName();
+ String categoryName = NamingService.class.getName();
naming = new Main(categoryName);
}
-
+
// Public --------------------------------------------------------
public void setPort(int port)
{
@@ -138,7 +137,7 @@
{
String key = (String) keys.nextElement();
String value = props.getProperty(key);
- category.debug("System.setProperty, key="+key+", value="+value);
+ log.debug("System.setProperty, key="+key+", value="+value);
System.setProperty(key, value);
}
}
@@ -154,19 +153,19 @@
InitialContext iniCtx = new InitialContext();
Hashtable env = iniCtx.getEnvironment();
Enumeration keys = env.keys();
- category.info("InitialContext Environment:");
+ log.info("InitialContext Environment:");
String providerURL = null;
while( keys.hasMoreElements() )
{
String key = (String) keys.nextElement();
String value = (String) env.get(key);
- category.info("key="+key+", value="+value);
+ log.info("key="+key+", value="+value);
if( key.equals(Context.PROVIDER_URL) )
providerURL = value;
}
// Warn if there was a Context.PROVIDER_URL
if( providerURL != null )
- category.warn("Saw Context.PROVIDER_URL in server jndi.properties,
url="+providerURL);
+ log.warn("Saw Context.PROVIDER_URL in server jndi.properties,
url="+providerURL);
/* Bind a ObjectFactory to "java:comp" so that "java:comp/env" lookups
produce a
unique context for each thread contexxt ClassLoader that performs the lookup.
@@ -177,13 +176,13 @@
Reference envRef = new Reference("javax.naming.Context", refAddr,
ENCFactory.class.getName(), null);
Context ctx = (Context) iniCtx.lookup("java:");
ctx.rebind("comp", envRef);
- category.info("Naming started on port "+naming.getPort());
+ log.info("Naming started on port "+naming.getPort());
}
public void stopService()
{
naming.stop();
- category.info("JNP server stopped");
+ log.info("JNP server stopped");
}
// Protected -----------------------------------------------------
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development