hello,

i get
anonymous wrote : 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: connect]
when trying to call remote method on a bean deployed in jboss4.0.1-SP1. the 
machine is running mandrake linux 10 kernel 2.6.7.

im able to call the bean from servlet running on the same jboss installation. i 
got the above exception when calling the method from a standalone client 
running on different machine (windows).

theres no firewall running on both machines im using. so im guessing that this 
is a matter of address binding.  how do i change jboss' address binding?

Here's the code im using in the client app:

anonymous wrote : public static void main(String[] args) {
  |         try {
  |             
  |                 System.setProperty("java.naming.factory.initial", 
"org.jnp.interfaces.NamingContextFactory");
  |                 System.setProperty("java.naming.provider.url", 
"jnp://192.168.0.3:1099");
  |                InitialContext ctx = new InitialContext();
  |                Object objref = ctx.lookup("helloBean");
  |                helloBeanRemoteHome beanHome = 
(helloBeanRemoteHome)PortableRemoteObject.narrow(objref,helloBeanRemoteHome.class);
  |                helloBeanRemote mrBean = beanHome.create();
  |                
  |                System.out.println("Mr. Bean bilang: 
"+mrBean.sayHello()+"\n");
  |         } catch (Exception NamingException) {
  |                System.out.println(NamingException.getMessage());
  |                NamingException.printStackTrace();
  |         }
  |     }

thanks

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872462#3872462

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3872462


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to