I have just installed
JBoss 3.2.3. It seems to work fine running the default implementation. I have deployed the Remote Entity bean found in the O'Reilly, Enterprise
Java Beans (ver. 3) book. If I run the client to this bean on the server machine it runs fine. However, if I run the same client from a remote machine on the same network, changing only the jndi.properties file so that:
java.naming.provider.url=jnp://myserver:1099
I get a stack trace which indicates that the connection is being being refused by the loop-back address (127.0.0.1). I am able to telnet this port on myserver. I am not sure whether my problem is in the client setup or in the server configuration. Here is what the stack trace looks like
run.client_41a:
[java] javax.naming.CommunicationException. Root exception is java.rmi.Con
nectException: Connection refused to host: 127.0.0.1; nested exception is:
[java] java.net.ConnectException: Connection refused: connect
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:
567)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.
java:185)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.jav
a:171)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:52
8)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:50
7)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:347)
[java] at com.titan.clients.Client_1.main(Client_1.java:17)
[java] Caused by: java.net.ConnectException: Connection refused: connect
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.jav
a:161)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
[java] at java.net.Socket.connect(Socket.java:425)
[java] at java.net.Socket.connect(Socket.java:375)
[java] at java.net.Socket.<init>(Socket.java:290)
[java] at java.net.Socket.<init>(Socket.java:118)
[java] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(R
MIDirectSocketFactory.java:22)
[java] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(R
MIMasterSocketFactory.java:122)
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:
562)