JBoss Remoting SVN: r4558 - remoting2/branches/2.x/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-09 02:59:23 -0400 (Tue, 09 Sep 2008)
New Revision: 4558
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java
Log:
JBREM-1030: Updated version to 2.5.0.GA.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java 2008-09-09 01:14:59 UTC (rev 4557)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java 2008-09-09 06:59:23 UTC (rev 4558)
@@ -34,7 +34,7 @@
public static final byte VERSION_2 = 2;
public static final byte VERSION_2_2 = 22;
- public static final String VERSION = "2.4.0.SP2 (Pinto)";
+ public static final String VERSION = "2.5.0.GA (Flounder)";
private static final byte byteVersion = VERSION_2_2;
private static byte defaultByteVersion = byteVersion;
private static boolean performVersioning = true;
16 years, 2 months
JBoss Remoting SVN: r4557 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-08 21:14:59 -0400 (Mon, 08 Sep 2008)
New Revision: 4557
Modified:
remoting2/branches/2.x/build.xml
Log:
JBREM-1033: Eliminated ServerSocketFactoryProxyTestCase for jdk 1.4.
Modified: remoting2/branches/2.x/build.xml
===================================================================
--- remoting2/branches/2.x/build.xml 2008-09-09 01:09:06 UTC (rev 4556)
+++ remoting2/branches/2.x/build.xml 2008-09-09 01:14:59 UTC (rev 4557)
@@ -1173,6 +1173,7 @@
<!-- <exclude name="**/remoting/transport/multiplex/**/MultiplexMultiThreadedPerformanceTestCase.class"/> -->
<exclude name="**/remoting/classloader/InvokerTestCase.class" if="isJDK4"/>
<exclude name="**/remoting/oneway/OnewayThreadPoolTestCase.class" if="isJDK4"/>
+ <exclude name="**/remoting/security/ServerSocketFactoryProxyTestCase.class" if="isJDK4"/>
</fileset>
</batchtest>
</junit>
16 years, 2 months
JBoss Remoting SVN: r4556 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-08 21:09:06 -0400 (Mon, 08 Sep 2008)
New Revision: 4556
Modified:
remoting2/branches/2.x/build.xml
Log:
JBREM-1033: Eliminated classloader/InvokerTestCase and OnewayThreadPoolTestCase for jdk 1.4.
Modified: remoting2/branches/2.x/build.xml
===================================================================
--- remoting2/branches/2.x/build.xml 2008-09-08 07:15:51 UTC (rev 4555)
+++ remoting2/branches/2.x/build.xml 2008-09-09 01:09:06 UTC (rev 4556)
@@ -1171,6 +1171,8 @@
<exclude name="**/remoting/versioning/**/*TestCase.class"/>
<exclude name="**remoting/marshall/encrypt/**"/>
<!-- <exclude name="**/remoting/transport/multiplex/**/MultiplexMultiThreadedPerformanceTestCase.class"/> -->
+ <exclude name="**/remoting/classloader/InvokerTestCase.class" if="isJDK4"/>
+ <exclude name="**/remoting/oneway/OnewayThreadPoolTestCase.class" if="isJDK4"/>
</fileset>
</batchtest>
</junit>
16 years, 2 months
JBoss Remoting SVN: r4555 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-08 03:15:51 -0400 (Mon, 08 Sep 2008)
New Revision: 4555
Modified:
remoting2/branches/2.x/build.xml
Log:
JBREM-1033: Excludes lib/jdk14 from classpath unless using jdk1.4.
Modified: remoting2/branches/2.x/build.xml
===================================================================
--- remoting2/branches/2.x/build.xml 2008-09-08 07:14:43 UTC (rev 4554)
+++ remoting2/branches/2.x/build.xml 2008-09-08 07:15:51 UTC (rev 4555)
@@ -273,6 +273,7 @@
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
<!--exclude name="apache-tomcat/*.jar" unless="isJDK4"/-->
+ <exclude name="**/jdk14/*.jar" unless="isJDK4"/>
<include name="**/jdk14/*.jar" if="isJDK4"/>
<exclude name="apache-log4j/lib/log4j.jar" if="isJDK4"/>
<exclude name="jboss/jboss-j2se.jar" if="isJDK4"/>
16 years, 2 months
JBoss Remoting SVN: r4554 - in remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi: deadlock and 2 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-08 03:14:43 -0400 (Mon, 08 Sep 2008)
New Revision: 4554
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/CleanDetectionTestServer.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetector2TestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTest1.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestServer.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock/Server.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock3/Server.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java
Log:
JBREM-1033: Creates NamingBean class for getting setNamingInfo() method.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/CleanDetectionTestServer.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/CleanDetectionTestServer.java 2008-09-08 07:13:36 UTC (rev 4553)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/CleanDetectionTestServer.java 2008-09-08 07:14:43 UTC (rev 4554)
@@ -129,12 +129,12 @@
protected void setupJNDI() 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[] {});
}
@@ -151,6 +151,7 @@
jserver.setRmiPort(31000);
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});
}
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetector2TestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetector2TestCase.java 2008-09-08 07:13:36 UTC (rev 4553)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetector2TestCase.java 2008-09-08 07:14:43 UTC (rev 4554)
@@ -30,12 +30,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[] {});
}
@@ -49,6 +49,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});
}
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTest1.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTest1.java 2008-09-08 07:13:36 UTC (rev 4553)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTest1.java 2008-09-08 07:14:43 UTC (rev 4554)
@@ -170,12 +170,12 @@
{
// start JNDI 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[] {});
}
@@ -190,6 +190,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/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTestCase.java 2008-09-08 07:13:36 UTC (rev 4553)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTestCase.java 2008-09-08 07:14:43 UTC (rev 4554)
@@ -52,12 +52,12 @@
{
// start JNDI 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[] {});
}
@@ -72,6 +72,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/tests/org/jboss/test/remoting/detection/jndi/RestartTestServer.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestServer.java 2008-09-08 07:13:36 UTC (rev 4553)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestServer.java 2008-09-08 07:14:43 UTC (rev 4554)
@@ -126,12 +126,12 @@
protected void setupJNDI() 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[] {});
}
@@ -145,6 +145,7 @@
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});
}
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock/Server.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock/Server.java 2008-09-08 07:13:36 UTC (rev 4553)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock/Server.java 2008-09-08 07:14:43 UTC (rev 4554)
@@ -222,12 +222,12 @@
private void startJNDIServer() 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[] {});
}
@@ -241,6 +241,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});
}
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock3/Server.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock3/Server.java 2008-09-08 07:13:36 UTC (rev 4553)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock3/Server.java 2008-09-08 07:14:43 UTC (rev 4554)
@@ -195,12 +195,12 @@
private void startJNDIServer() 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[] {});
}
@@ -214,6 +214,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});
}
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java 2008-09-08 07:13:36 UTC (rev 4553)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java 2008-09-08 07:14:43 UTC (rev 4554)
@@ -56,12 +56,12 @@
{
// start JNDI 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[] {});
}
@@ -75,6 +75,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});
}
16 years, 2 months
JBoss Remoting SVN: r4553 - in remoting2/branches/2.x/src/main/org/jboss/remoting: samples/detection/jndi and 1 other directories.
by jboss-remoting-commits@lists.jboss.org
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});
}
16 years, 2 months
JBoss Remoting SVN: r4552 - in remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi: deadlock and 2 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-08 02:19:23 -0400 (Mon, 08 Sep 2008)
New Revision: 4552
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/CleanDetectionTestServer.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetector2TestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTest1.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestServer.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock/Server.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock3/Server.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java
Log:
JBREM-1033: Creates NamingBeanImpl reflectively to enable use of older jnpserver.jar.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/CleanDetectionTestServer.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/CleanDetectionTestServer.java 2008-09-08 06:18:18 UTC (rev 4551)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/CleanDetectionTestServer.java 2008-09-08 06:19:23 UTC (rev 4552)
@@ -30,11 +30,11 @@
import org.jboss.remoting.callback.InvokerCallbackHandler;
import org.jboss.remoting.detection.AbstractDetector;
import org.jboss.remoting.detection.jndi.JNDIDetector;
+import org.jboss.remoting.samples.detection.jndi.SimpleJNDIServer;
import org.jboss.remoting.transport.Connector;
import org.jboss.remoting.transport.PortUtil;
import org.jboss.remoting.util.SecurityUtility;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
@@ -43,6 +43,7 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.Field;
+import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
@@ -127,17 +128,32 @@
protected void setupJNDI() throws Exception
{
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
-
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ }
+
String host = InetAddress.getLocalHost().getHostAddress();
jserver = new Main();
jserver.setPort(detectorPort);
jserver.setBindAddress(host);
jserver.setRmiPort(31000);
- jserver.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = jserver.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(jserver, new Object[] {namingBean});
+ }
jserver.start();
System.out.println("Started JNDI server on " + host + ":" + port);
}
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetector2TestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetector2TestCase.java 2008-09-08 06:18:18 UTC (rev 4551)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetector2TestCase.java 2008-09-08 06:19:23 UTC (rev 4552)
@@ -1,11 +1,12 @@
package org.jboss.test.remoting.detection.jndi;
import org.jboss.jrunit.harness.TestDriver;
+import org.jboss.remoting.samples.detection.jndi.SimpleJNDIServer;
import org.jboss.remoting.util.SecurityUtility;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
import org.apache.log4j.Level;
+import java.lang.reflect.Method;
import java.net.InetAddress;
/**
@@ -28,14 +29,29 @@
{
try
{
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ }
String host = InetAddress.getLocalHost().getHostAddress();
Main jserver = new Main();
- jserver.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = jserver.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(jserver, new Object[] {namingBean});
+ }
int port = 2410;
jserver.setPort(port);
jserver.setBindAddress(host);
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTest1.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTest1.java 2008-09-08 06:18:18 UTC (rev 4551)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTest1.java 2008-09-08 06:19:23 UTC (rev 4552)
@@ -22,6 +22,7 @@
package org.jboss.test.remoting.detection.jndi;
+import java.lang.reflect.Method;
import java.net.InetAddress;
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
@@ -32,12 +33,12 @@
import org.jboss.remoting.detection.jndi.JNDIDetector;
import org.jboss.remoting.network.NetworkInstance;
import org.jboss.remoting.network.NetworkRegistry;
+import org.jboss.remoting.samples.detection.jndi.SimpleJNDIServer;
import org.jboss.remoting.transport.Connector;
import org.jboss.remoting.util.SecurityUtility;
import org.jboss.test.remoting.TestUtil;
import org.jboss.test.remoting.transport.mock.MockServerInvocationHandler;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
import junit.framework.TestCase;
@@ -168,15 +169,30 @@
try
{
// start JNDI server
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ }
int port = 1099;
//String host = "localhost";
String host = InetAddress.getLocalHost().getHostName();
Main JNDIServer = new Main();
- JNDIServer.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = JNDIServer.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(JNDIServer, new Object[] {namingBean});
+ }
JNDIServer.setPort(port);
JNDIServer.setBindAddress(host);
JNDIServer.start();
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTestCase.java 2008-09-08 06:18:18 UTC (rev 4551)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/JNDIDetectorTestCase.java 2008-09-08 06:19:23 UTC (rev 4552)
@@ -22,12 +22,13 @@
package org.jboss.test.remoting.detection.jndi;
+import java.lang.reflect.Method;
import java.net.InetAddress;
import org.apache.log4j.Level;
import org.jboss.jrunit.harness.TestDriver;
+import org.jboss.remoting.samples.detection.jndi.SimpleJNDIServer;
import org.jboss.remoting.util.SecurityUtility;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
/**
* This should be used as the main test case for JNDI detector.
@@ -50,15 +51,30 @@
try
{
// start JNDI server
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ }
int port = 1099;
//String host = "localhost";
String host = InetAddress.getLocalHost().getHostName();
Main JNDIServer = new Main();
- JNDIServer.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = JNDIServer.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(JNDIServer, new Object[] {namingBean});
+ }
JNDIServer.setPort(port);
JNDIServer.setBindAddress(host);
JNDIServer.start();
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestServer.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestServer.java 2008-09-08 06:18:18 UTC (rev 4551)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestServer.java 2008-09-08 06:19:23 UTC (rev 4552)
@@ -29,10 +29,10 @@
import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.callback.InvokerCallbackHandler;
import org.jboss.remoting.detection.jndi.JNDIDetector;
+import org.jboss.remoting.samples.detection.jndi.SimpleJNDIServer;
import org.jboss.remoting.transport.Connector;
import org.jboss.remoting.util.SecurityUtility;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
@@ -40,6 +40,7 @@
import java.io.InputStream;
import java.io.OutputStream;
+import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
@@ -124,14 +125,29 @@
protected void setupJNDI() throws Exception
{
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ };
String host = InetAddress.getLocalHost().getHostAddress();
jserver = new Main();
- jserver.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = jserver.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(jserver, new Object[] {namingBean});
+ }
jserver.setPort(detectorPort);
jserver.setBindAddress(host);
jserver.setRmiPort(31000);
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock/Server.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock/Server.java 2008-09-08 06:18:18 UTC (rev 4551)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock/Server.java 2008-09-08 06:19:23 UTC (rev 4552)
@@ -30,17 +30,19 @@
import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.callback.InvokerCallbackHandler;
import org.jboss.remoting.detection.jndi.JNDIDetector;
+import org.jboss.remoting.samples.detection.jndi.SimpleJNDIServer;
import org.jboss.remoting.security.SSLSocketBuilder;
import org.jboss.remoting.transport.Connector;
import org.jboss.remoting.transport.sslmultiplex.SSLMultiplexServerInvoker;
import org.jboss.remoting.util.SecurityUtility;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;
import javax.net.ServerSocketFactory;
+
+import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
@@ -219,14 +221,29 @@
private void startJNDIServer() throws Exception
{
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ }
String host = InetAddress.getLocalHost().getHostAddress();
Main jserver = new Main();
- jserver.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = jserver.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(jserver, new Object[] {namingBean});
+ }
jserver.setPort(2410);
jserver.setBindAddress(host);
jserver.setRmiPort(31000);
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock3/Server.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock3/Server.java 2008-09-08 06:18:18 UTC (rev 4551)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock3/Server.java 2008-09-08 06:19:23 UTC (rev 4552)
@@ -30,17 +30,19 @@
import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.callback.InvokerCallbackHandler;
import org.jboss.remoting.detection.jndi.JNDIDetector;
+import org.jboss.remoting.samples.detection.jndi.SimpleJNDIServer;
import org.jboss.remoting.security.SSLSocketBuilder;
import org.jboss.remoting.transport.Connector;
import org.jboss.remoting.transport.sslmultiplex.SSLMultiplexServerInvoker;
import org.jboss.remoting.util.SecurityUtility;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;
import javax.net.ServerSocketFactory;
+
+import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
@@ -192,14 +194,29 @@
private void startJNDIServer() throws Exception
{
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ }
String host = InetAddress.getLocalHost().getHostAddress();
Main jserver = new Main();
- jserver.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = jserver.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(jserver, new Object[] {namingBean});
+ }
jserver.setPort(2410);
jserver.setBindAddress(host);
jserver.setRmiPort(31000);
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java 2008-09-08 06:18:18 UTC (rev 4551)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java 2008-09-08 06:19:23 UTC (rev 4552)
@@ -26,16 +26,17 @@
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.detection.jndi.JNDIDetector;
import org.jboss.remoting.network.NetworkRegistry;
+import org.jboss.remoting.samples.detection.jndi.SimpleJNDIServer;
import org.jboss.remoting.transport.Connector;
import org.jboss.remoting.util.SecurityUtility;
import org.jboss.test.remoting.TestUtil;
import org.jboss.test.remoting.transport.mock.MockServerInvocationHandler;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
-
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;
+
+import java.lang.reflect.Method;
import java.net.InetAddress;
/**
@@ -54,14 +55,29 @@
public void setUp() throws Exception
{
// start JNDI server
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ }
int port = 1099;
String host = InetAddress.getLocalHost().getHostName();
Main JNDIServer = new Main();
- JNDIServer.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = JNDIServer.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(JNDIServer, new Object[] {namingBean});
+ }
JNDIServer.setPort(port);
JNDIServer.setBindAddress(host);
JNDIServer.start();
16 years, 2 months
JBoss Remoting SVN: r4551 - in remoting2/branches/2.x/src/main/org/jboss/remoting: samples/detection/jndi and 1 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-08 02:18:18 -0400 (Mon, 08 Sep 2008)
New Revision: 4551
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 NamingBeanImpl reflectively to enable use of older jnpserver.jar.
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:16:03 UTC (rev 4550)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/detection/jndi/JNDIDetector.java 2008-09-08 06:18:18 UTC (rev 4551)
@@ -31,7 +31,6 @@
import org.jboss.remoting.util.SecurityUtility;
import org.jnp.interfaces.NamingContextFactory;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
import javax.naming.Binding;
import javax.naming.Context;
@@ -40,12 +39,9 @@
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
-import java.io.IOException;
-import java.net.InetAddress;
+import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
import java.util.Map;
import java.util.Properties;
@@ -444,9 +440,20 @@
{
log.info("JNDI Server configuration information not present so will create a local server.");
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ log.debug("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ }
host = SecurityUtility.getLocalHostName();
port = PortUtil.findFreePort(host);
@@ -456,7 +463,11 @@
//If no server information provided, then start one of our own by default
Main server = new Main();
- server.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = server.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(server, new Object[] {namingBean});
+ }
server.setPort(port);
server.setBindAddress(host);
server.start();
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:16:03 UTC (rev 4550)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/samples/detection/jndi/SimpleJNDIServer.java 2008-09-08 06:18:18 UTC (rev 4551)
@@ -2,8 +2,8 @@
import org.jboss.remoting.util.SecurityUtility;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
+import java.lang.reflect.Method;
import java.net.InetAddress;
/**
@@ -88,15 +88,30 @@
private void setupJNDIServer() throws Exception
{
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ }
// start JNDI server
String detectorHost = InetAddress.getLocalHost().getHostName();
Main JNDIServer = new Main();
- JNDIServer.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = JNDIServer.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(JNDIServer, new Object[] {namingBean});
+ }
JNDIServer.setPort(detectorPort);
JNDIServer.setBindAddress(detectorHost);
JNDIServer.start();
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:16:03 UTC (rev 4550)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/samples/transporter/custom/server/JNDIServer.java 2008-09-08 06:18:18 UTC (rev 4551)
@@ -21,10 +21,11 @@
*/
package org.jboss.remoting.samples.transporter.custom.server;
+import org.jboss.remoting.samples.detection.jndi.SimpleJNDIServer;
import org.jboss.remoting.util.SecurityUtility;
import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
+import java.lang.reflect.Method;
import java.net.InetAddress;
/**
@@ -38,14 +39,29 @@
{
try
{
- SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl namingBean = new NamingBeanImpl();
- namingBean.start();
+ Object namingBean = null;
+ Class namingBeanClass = null;
+ try
+ {
+ namingBeanClass = Class.forName("org.jnp.server.NamingBeanImpl");
+ namingBean = namingBeanClass.newInstance();
+ Method startMethod = namingBeanClass.getMethod("start", new Class[] {});
+ SecurityUtility.setSystemProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ startMethod.invoke(namingBean, new Object[] {});
+ }
+ catch (Exception e)
+ {
+ SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
+ }
String host = InetAddress.getLocalHost().getHostAddress();
Main jserver = new Main();
- jserver.setNamingInfo(namingBean);
+ if (namingBean != null)
+ {
+ Method setNamingInfoMethod = jserver.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
+ setNamingInfoMethod.invoke(jserver, new Object[] {namingBean});
+ }
int port = JNDI_PORT;
jserver.setPort(port);
jserver.setBindAddress(host);
16 years, 2 months
JBoss Remoting SVN: r4550 - remoting2/branches/2.x/lib/jdk14.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-08 02:16:03 -0400 (Mon, 08 Sep 2008)
New Revision: 4550
Added:
remoting2/branches/2.x/lib/jdk14/README
Log:
JBREM-1033: Added README with description of directory's purpose.
Added: remoting2/branches/2.x/lib/jdk14/README
===================================================================
--- remoting2/branches/2.x/lib/jdk14/README (rev 0)
+++ remoting2/branches/2.x/lib/jdk14/README 2008-09-08 06:16:03 UTC (rev 4550)
@@ -0,0 +1,3 @@
+This directory contains older versions of certain jars that have been upgraded
+in other lib directories to versions created with jdk 1.5 (or newer). These versions
+may be used when running with jdk 1.4.
\ No newline at end of file
16 years, 2 months
JBoss Remoting SVN: r4549 - in remoting2/branches/2.x/lib: jdk14 and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-08 02:13:26 -0400 (Mon, 08 Sep 2008)
New Revision: 4549
Added:
remoting2/branches/2.x/lib/jdk14/
remoting2/branches/2.x/lib/jdk14/concurrent.jar
remoting2/branches/2.x/lib/jdk14/jboss-common.jar
remoting2/branches/2.x/lib/jdk14/jboss-jmx.jar
remoting2/branches/2.x/lib/jdk14/jnpserver.jar
remoting2/branches/2.x/lib/jdk14/log4j.jar
remoting2/branches/2.x/lib/jdk14/servlet-api.jar
Log:
JBREM-1033: Created jdk14 lib directory with older jars when using jdk 1.4.
Added: remoting2/branches/2.x/lib/jdk14/concurrent.jar
===================================================================
(Binary files differ)
Property changes on: remoting2/branches/2.x/lib/jdk14/concurrent.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: remoting2/branches/2.x/lib/jdk14/jboss-common.jar
===================================================================
(Binary files differ)
Property changes on: remoting2/branches/2.x/lib/jdk14/jboss-common.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: remoting2/branches/2.x/lib/jdk14/jboss-jmx.jar
===================================================================
(Binary files differ)
Property changes on: remoting2/branches/2.x/lib/jdk14/jboss-jmx.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: remoting2/branches/2.x/lib/jdk14/jnpserver.jar
===================================================================
(Binary files differ)
Property changes on: remoting2/branches/2.x/lib/jdk14/jnpserver.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: remoting2/branches/2.x/lib/jdk14/log4j.jar
===================================================================
(Binary files differ)
Property changes on: remoting2/branches/2.x/lib/jdk14/log4j.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: remoting2/branches/2.x/lib/jdk14/servlet-api.jar
===================================================================
(Binary files differ)
Property changes on: remoting2/branches/2.x/lib/jdk14/servlet-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 2 months