Hi,
You need something like this;
Properties p = new Properties( );
| //Specify the JNDI properties specific to the vendor.
| p.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
| p.put("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");
| p.put("java.naming.provider.url","jboss_host_name");
| Context ctx = new InitialContext(p);
|
| Object ref = context.lookup("path_to_ejb_in_jndi");
| BeanRemoteInterface bean = (BeanRemoteInterface)
| PortableRemoteObject.narrow(ref,BeanRemoteInterface.class);
And you will need the remote interface on your classpath and the jboss client lib.
/klejs
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990268#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...