User: starksm
Date: 01/05/24 09:24:04
Modified: src/main/org/jnp/server Tag: Branch_2_2 Main.java
Log:
Don't use log4j in 2.2 as it conflicts with the default legacy logging
Revision Changes Path
No revision
No revision
1.5.2.1 +17 -12 jnp/src/main/org/jnp/server/Main.java
Index: Main.java
===================================================================
RCS file: /cvsroot/jboss/jnp/src/main/org/jnp/server/Main.java,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- Main.java 2001/04/26 07:50:52 1.5
+++ Main.java 2001/05/24 16:24:04 1.5.2.1
@@ -33,7 +33,7 @@
@author oberg
@author [EMAIL PROTECTED]
-@version $Revision: 1.5 $
+@version $Revision: 1.5.2.1 $
*/
public class Main
implements Runnable, MainMBean
@@ -78,7 +78,7 @@
// Set configuration from the system properties
setPort(Integer.getInteger("jnp.port",getPort()).intValue());
setRmiPort(Integer.getInteger("jnp.rmiPort",getRmiPort()).intValue());
- log = Category.getInstance("Naming");
+ //log = Category.getInstance("Naming");
}
// Public --------------------------------------------------------
@@ -91,7 +91,7 @@
public void start()
throws Exception
{
- log.info("Starting jnp server");
+ System.out.println("Starting jnp server");
// Create remote object
theServer = new NamingServer();
@@ -106,11 +106,12 @@
{
serverSocket = null;
serverSocket = new ServerSocket(getPort());
- log.info("Started jnpPort=" + getPort()+", rmiPort="+getRmiPort());
+ System.out.println("Started jnpPort=" + getPort()+",
rmiPort="+getRmiPort());
listen();
} catch (IOException e)
{
- log.error("Could not start on port " + getPort(), e);
+ System.err.println("Could not start on port " + getPort());
+ e.printStackTrace();
}
}
@@ -118,7 +119,7 @@
{
try
{
- log.info("Stopping");
+ System.out.println("Stopping");
// Unexport server
UnicastRemoteObject.unexportObject(theServer, false);
@@ -127,10 +128,11 @@
ServerSocket s = serverSocket;
serverSocket = null;
s.close();
- log.info("Stopped");
+ System.out.println("Stopped");
} catch (Exception e)
{
- log.error("Exception during shutdown", e);
+ System.err.println("Exception during shutdown");
+ e.printStackTrace();
}
}
@@ -146,14 +148,16 @@
} catch (IOException e)
{
if (serverSocket == null) return; // Stopped by normal means
- log.error("Naming stopped", e);
- log.info("Restarting naming");
+ System.err.println("Naming stopped");
+ e.printStackTrace();
+ System.out.println("Restarting naming");
try
{
start();
} catch (Exception ex)
{
- log.error("Restart failed", ex);
+ System.err.println("Restart failed");
+ ex.printStackTrace();
return;
}
}
@@ -169,7 +173,8 @@
}
catch (IOException ex)
{
- log.error("Error writing response", ex);
+ System.err.println("Error writing response");
+ ex.printStackTrace();
}
finally
{
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development