Greetings,
I have proxy class that contains some static methods. These static methods
access an RMI remote object via a JNDI lookup and put the remote object to
work. When one of these static methods is called on the proxy class, the
first thing it does is initialize itself if it is not already initialized.
The initialization process binds the RMI remote object to the JBoss JNDI
tree if the object is not already bound.
I have created a TestBean that uses the proxy class and has successfully
been deployed.
I have created a test application that uses the proxy class as well, and
makes JNDI calls to the TestBean. So the proxy class is being used in two
different VM's. The VM pointed to by my Java IDE (Kawa), and the JBoss VM.
When I run the test application the first time, it uses a method on the
proxy class that accesses the RMI remote object and puts it to work. Before
the method is invoked, my local VM loads the class and binds the RMI remote
object to the JBoss JNDI tree.
The test application then gets a remote reference to the TestBean and calls
a method which in turn calls the same method on the proxy class as above.
When the JBoss VM loads the proxy class, it finds that the RMI remote object
is already bound to the JBoss JNDI tree. The proxy class access the RMI
remote object and puts it to work.
The test application exits.
Now, if I restart the test application to repeat the process, I get the
following exception:
java.rmi.ConnectException: Connection refused to host: 192.168.0.102; nested
exception is:
java.net.ConnectException: Connection refused: no further information
java.net.ConnectException: Connection refused: no further information at
java.net.PlainSocketImpl.socketConnect(Native Method) at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312) at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125) at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112) at
java.net.Socket.<init>(Socket.java:273) at
java.net.Socket.<init>(Socket.java:100) at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketF
actory.java:25) at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketF
actory.java:120) at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:499) at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:190) at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174) at
sun.rmi.server.UnicastRef.invoke(UnicastRef.java:83)
Does anyone know why the connection is being refused? The proxy class is
still registered with the JBoss JNDI tree, so that when the test application
starts, the only difference is, that it does not have to bind the RMI remote
object since it is already available.
Robert Taylor - Staff Developer
Trisect, Inc.
2030 Powers Ferry Road
Suite 121
Atlanta, Georgia 30339
[EMAIL PROTECTED]
770.850.9858 xt. 1509
Robert Taylor - Staff Developer
Trisect, Inc.
2030 Powers Ferry Road
Suite 121
Atlanta, Georgia 30339
[EMAIL PROTECTED]
770.850.9858 xt. 1509
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]