Author: ron.sigal(a)jboss.com
Date: 2008-09-08 03:13:36 -0400 (Mon, 08 Sep 2008)
New Revision: 4553
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/jndi/JNDIDetector.java
remoting2/branches/2.x/src/main/org/jboss/remoting/samples/detection/jndi/SimpleJNDIServer.java
remoting2/branches/2.x/src/main/org/jboss/remoting/samples/transporter/custom/server/JNDIServer.java
Log:
JBREM-1033: Creates NamingBean class for getting setNamingInfo() method.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/jndi/JNDIDetector.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/jndi/JNDIDetector.java 2008-09-08
06:19:23 UTC (rev 4552)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/jndi/JNDIDetector.java 2008-09-08
07:13:36 UTC (rev 4553)
@@ -441,12 +441,12 @@
log.info("JNDI Server configuration information not present so will
create a local server.");
Object namingBean = null;
- Class namingBeanClass = null;
+ Class namingBeanImplClass = null;
try
{
- namingBeanClass =
Class.forName("org.jnp.server.NamingBeanImpl");
- namingBean = namingBeanClass.newInstance();
- Method startMethod = namingBeanClass.getMethod("start", new
Class[] {});
+ namingBeanImplClass =
Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanImplClass.newInstance();
+ Method startMethod = namingBeanImplClass.getMethod("start", new
Class[] {});
SecurityUtility.setSystemProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
startMethod.invoke(namingBean, new Object[] {});
}
@@ -465,6 +465,7 @@
Main server = new Main();
if (namingBean != null)
{
+ Class namingBeanClass =
Class.forName("org.jnp.server.NamingBean");
Method setNamingInfoMethod =
server.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
setNamingInfoMethod.invoke(server, new Object[] {namingBean});
}
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/samples/detection/jndi/SimpleJNDIServer.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/samples/detection/jndi/SimpleJNDIServer.java 2008-09-08
06:19:23 UTC (rev 4552)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/samples/detection/jndi/SimpleJNDIServer.java 2008-09-08
07:13:36 UTC (rev 4553)
@@ -89,12 +89,12 @@
private void setupJNDIServer() throws Exception
{
Object namingBean = null;
- Class namingBeanClass = null;
+ Class namingBeanImplClass = null;
try
{
- namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
- namingBean = namingBeanClass.newInstance();
- Method startMethod = namingBeanClass.getMethod("start", new Class[]
{});
+ namingBeanImplClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanImplClass.newInstance();
+ Method startMethod = namingBeanImplClass.getMethod("start", new
Class[] {});
SecurityUtility.setSystemProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
startMethod.invoke(namingBean, new Object[] {});
}
@@ -109,6 +109,7 @@
Main JNDIServer = new Main();
if (namingBean != null)
{
+ Class namingBeanClass = Class.forName("org.jnp.server.NamingBean");
Method setNamingInfoMethod =
JNDIServer.getClass().getMethod("setNamingInfo", new Class[]
{namingBeanClass});
setNamingInfoMethod.invoke(JNDIServer, new Object[] {namingBean});
}
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/samples/transporter/custom/server/JNDIServer.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/samples/transporter/custom/server/JNDIServer.java 2008-09-08
06:19:23 UTC (rev 4552)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/samples/transporter/custom/server/JNDIServer.java 2008-09-08
07:13:36 UTC (rev 4553)
@@ -40,12 +40,12 @@
try
{
Object namingBean = null;
- Class namingBeanClass = null;
+ Class namingBeanImplClass = null;
try
{
- namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
- namingBean = namingBeanClass.newInstance();
- Method startMethod = namingBeanClass.getMethod("start", new Class[]
{});
+ namingBeanImplClass =
Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanImplClass.newInstance();
+ Method startMethod = namingBeanImplClass.getMethod("start", new
Class[] {});
SecurityUtility.setSystemProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
startMethod.invoke(namingBean, new Object[] {});
}
@@ -59,6 +59,7 @@
Main jserver = new Main();
if (namingBean != null)
{
+ Class namingBeanClass =
Class.forName("org.jnp.server.NamingBean");
Method setNamingInfoMethod =
jserver.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
setNamingInfoMethod.invoke(jserver, new Object[] {namingBean});
}
Show replies by date