I think i had the same problem. In my case we use linux, and the hosts file had a 127.0.0.2 pointing to the host name (ex: xxx.xxx.com) We use a jndi.properties
Jon Swinth wrote: > What is the correct way to access, from one Jboss server, a bean that resides > on a different JBoss server? I have one session bean that needs to talk to > another session bean on a different server. I tried having the session bean > act as just a regular client, but it just errors. Here is the code I tried > to use: > > Properties props = new Properties(); > props.setProperty(Context.INITIAL_CONTEXT_FACTORY, > "org.jnp.interfaces.NamingContextFactory"); > props.setProperty(Context.URL_PKG_PREFIXES, "org.jnp.interfaces"); > props.setProperty(Context.PROVIDER_URL, "192.168.40.207:1099"); > InitialContext initialContext = new InitialContext(props) ; > > And here is the error I get: > > 2002-08-27 11:39:07,487 ERROR [org.jboss.ejb.plugins.LogInterceptor] > TransactionRolledbackException, causedBy: > 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:355) > at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:142) > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:129) > at java.net.Socket.<init>(Socket.java:273) > at java.net.Socket.<init>(Socket.java:100) > at > >sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:25) > at > >sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.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) > at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:450) > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:434) > at javax.naming.InitialContext.lookup(InitialContext.java:350) > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > -- Emerson Cargnin - MSA SICREDI - Tel : 3358-4860 ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
