I am doing some testing with jboss2.2/jetty3.0.5 set up.  I have
successfully deployed and accessed beans through servlets running on the
same server as jboss.  However, when I try to write an application on a
different machine, I get the following exception:

javax.naming.CommunicationException.  Root exception is
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested
exception is:
        java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:313)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
        at java.net.Socket.<init>(Socket.java:269)
        at java.net.Socket.<init>(Socket.java:98)
        at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketF
actory.java:29)
        at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketF
actory.java:124)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:497)
        at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:194)
        at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:178)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:87)
        at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:298)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:282)
        at javax.naming.InitialContext.lookup(InitialContext.java:354)
        at EJBTest.getHomeObject(EJBTest.java:71)
        at EJBTest.getUser(EJBTest.java:56)
        at EJBTest.main(EJBTest.java:28)

My jndi lookup code is :
                Properties ejbprops = new Properties();

ejbprops.setProperty("java.naming.factory.initial","org.jnp.interfaces.Namin
gContextFactory"));
                ejbprops.setProperty("java.naming.provider.url", MY_IP_ADDRESS:1099);
                InitialContext initial = new InitialContext(ejbprops);
                return initial.lookup(MY_BEAN_NAME);

I am using this in both the servlet(running on MY_IP_ADDRESS:8080) and the
application running on a different machine
Can anyone tell me what security settings I need to change to allow access
from other machines, and where to do this?


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to