donaldp 2003/02/21 21:09:29
Modified: src/java/org/apache/avalon/phoenix/components/manager
MX4JSystemManager.java
Log:
Fixup MX4j mbean so that the naming factory
is set on the MBean rather than setting the
JVM wide system property. This fixes problems
that can occur when the hosted applications
need a different JNDI factory.
Reported By: "Noel J. Bergman" <[EMAIL PROTECTED]>
Revision Changes Path
1.23 +3 -2
avalon-phoenix/src/java/org/apache/avalon/phoenix/components/manager/MX4JSystemManager.java
Index: MX4JSystemManager.java
===================================================================
RCS file:
/home/cvs/avalon-phoenix/src/java/org/apache/avalon/phoenix/components/manager/MX4JSystemManager.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- MX4JSystemManager.java 22 Feb 2003 04:03:27 -0000 1.22
+++ MX4JSystemManager.java 22 Feb 2003 05:09:29 -0000 1.23
@@ -189,8 +189,6 @@
private void startRMIAdaptor( final MBeanServer server )
throws Exception
{
- System.setProperty( "java.naming.factory.initial", m_namingFactory );
-
// Create and start the naming service
final ObjectName naming = new ObjectName( "Naming:type=rmiregistry" );
server.createMBean( "mx4j.tools.naming.NamingService", naming, null );
@@ -205,6 +203,9 @@
adaptor );
// Set the JNDI name with which will be registered
mbean.setJNDIName( "jrmp" );
+ mbean.putJNDIProperty( javax.naming.Context.INITIAL_CONTEXT_FACTORY,
+ m_namingFactory );
+ //mbean.putJNDIProperty( javax.naming.Context.PROVIDER_URL,
"rmi://localhost:1099" );
// Register the JRMP adaptor in JNDI and start it
mbean.start();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]