[jboss-user] [Remoting] - Re: Connection between servers through JNDI?
Clarich
do-not-reply at jboss.com
Thu Mar 29 13:28:06 EDT 2007
Hi Ron,
I guess I'll have a look to the bisocket protocol. But first, there is still a problem with my example. I wanted to exchange on the client side this method:
| public void setupConnection(int port, String host) throws Exception {
| log.info("setting up connection to JNDI Server");
| MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();
| NetworkRegistry registry = NetworkRegistry.getInstance();
| log.info("register NetworkRegistry with MBean Server");
| mbeanServer.registerMBean(registry, new ObjectName(
| "remoting:type=NetworkRegistry"));
|
| detector = new JNDIDetector();
| detector.setPort(port);
| detector.setHost(host);
| detector.setCleanDetectionNumber(1);
| mbeanServer.registerMBean(detector, new ObjectName(
| "remoting:type=JNDIDetector"));
| detector.start();
| while (detector.forceDetection() == null) {
| // retry
| }
|
with this one:
|
| public void setupConnection(int port, String host) throws Exception {
|
| MBeanServer server = MBeanServerFactory.createMBeanServer();
| NetworkRegistry registry = NetworkRegistry.getInstance();
| log.info("register NetworkRegistry with MBean Server");
| server.registerMBean(registry, new ObjectName(
| "remoting:type=NetworkRegistry"));
|
| detector = new JNDIDetector();
| detector.setPort(port);
| detector.setHost(host);
| ObjectName name = new ObjectName("remoting:type=JNDIDetector");
|
| server.registerMBean(detector, name);
| detector.start();
| }
|
|
What I got was this:
| reqistering with JNDI server
| 2007-03-29 19:13:41,971 WARN [main] org.jboss.remoting.detection.jndi.JNDIDetector: Detector: org.jboss.remoting.detection.jndi.JNDIDetector could not be loaded because the NetworkRegistry is not registered
| 2007-03-29 19:13:41,971 WARN [main] org.jboss.remoting.detection.jndi.JNDIDetector: This means that only the broadcasting of detection messages will be functional and will not be able to discover other servers.
| susseccfully reqistered with JNDI Server
| 2007-03-29 19:13:42,783 INFO [input:15824] org.jboss.remoting.transport.multiplex.InputMultiplexor: unknown socket id: 3
| 2007-03-29 19:13:42,799 INFO [MultiplexServerInvoker#0v-VirtualServerSocket[Socket[addr=/127.0.0.1,port=3231,localport=1101]]] org.jboss.remoting.transport.multiplex.MultiplexServerInvoker: socket is closed: stopping thread
| 2007-03-29 19:13:42,799 INFO [Remoting Detector - Heartbeat Thread: 0] org.jboss.remoting.detection.jndi.JNDIDetector: Added 3087152660c52e45x-3af92cc0x110ba7efe6bx-7ffb56 to registry.
| 2007-03-29 19:13:48,127 INFO [MultiplexServerInvoker#0v-VirtualServerSocket[Socket[addr=/127.0.0.1,port=3241,localport=1101]]] org.jboss.remoting.transport.multiplex.MultiplexServerInvoker: socket is closed: stopping thread
| 2007-03-29 19:13:48,346 INFO [input:15824] org.jboss.remoting.transport.multiplex.InputMultiplexor: java.io.IOException: An existing connection was forcibly closed by the remote host
| 2007-03-29 19:13:48,627 INFO [output:15824] org.jboss.remoting.transport.multiplex.OutputMultiplexor$OutputThread: java.nio.channels.ClosedChannelException
| 2007-03-29 19:13:48,971 INFO [Remoting Detector - Heartbeat Thread: 7] org.jboss.remoting.detection.jndi.JNDIDetector: Added 3087152660c52e45x-3af92cc0x110ba7efe6bx-7ffb56 to registry.
| 2007-03-29 19:13:52,564 INFO [input:15824] org.jboss.remoting.transport.multiplex.InputMultiplexor: Selector is closed: shutting down input thread
|
This is the whole dump of my server. When using the first method everything works fine.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032877#4032877
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032877
More information about the jboss-user
mailing list