Hashtable environment = new hashtable ();
Environment.put (context.initial_context_factory, "org.jnp.interfaces.namingContextFactory);
Environment.put (context.url_pkg_prefixes, "org.jboss.naming: org.jnp.interface");
Environment.put (Context.Provider_URL, "JNP: // localhost: 1099");
Context ctx = new InitialContext (); Object ref = ctx.lookup ( "Usertest"); UsertestHome uth = (UsertestHome) PortableRemoteObject.narrow (ref, UsertestHome.class); Usertest ut = uth.create ();