This is the client code I use to access my stateless session bean: public void main(String[] args) throws Exception { | Hashtable env = new Hashtable(); | env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); | env.put(Context.PROVIDER_URL, "localhost:1099"); | Context ctx = new InitialContext(env); | Object obj = ctx.lookup("HelloRemote"); | HelloRemoteHome home = (HelloRemoteHome)PortableRemoteObject.narrow(obj, HelloRemoteHome.class); | HelloRemote hello = home.create(); | System.out.println(hello.sayHello()); | }
You will, of course, have to change the above code to conform with the names of the classes and methods associated with your session bean. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3936311#3936311 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3936311 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user