[jboss-user] [Beginners Corner] - why ? - exception: error during JRMP connection establishmen

reckless_jack do-not-reply at jboss.com
Sat Sep 29 07:36:30 EDT 2007


hi can nyone tell me why problem mentioned in subject line is occuring
below here my code;

package example;

import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.Properties;

public class HelloClient {

      public static void main(String[ ] args) throws Exception {
            
             
          
             System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
             System.setProperty("java.naming.provider.url","jnp://localhost:1099");
            System.setProperty("java.naming.factory.url.pkgs","org.jboss.namimg:org.jboss.jnp.interfaces"); 
            System.setProperty("jnp.socketFactory","org.jnp.interfaces.TimedSocketFactory");
            System.setProperty("jnp.timeout","10000");

             Properties prop=System.getProperties( );
             
             Context ctx=new InitialContext( prop );

             Object obj=ctx.lookup("Hello");

             HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow( obj, HelloHome.class);

             Hello hello=home.create( );

             System.out.println( hello.hello() );
           
             hello.remove( );
     }
}
      

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

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



More information about the jboss-user mailing list