I dive in ejb in action code example and stuck with access to ejb3 out of jboss container. I'm having 2 session beans deployed on jboss 6.1.0 and i see from server log: ebj beans are bound to global jndi(java:global/?). So i have running client and it creates initialcontext with jndi.properties file:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=127.0.0.1:1098
My client code looks like: ... Context context = new InitialContext(); Object stub = context.lookup("chapter2/PlaceOrderBean/remote"); ... I'm getting the error:
Caused by: javax.naming.NameNotFoundException: ProxyFactory not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
I think jboss6 supports rmi and iiop-rmi protocol for remote ejbs. But i only experience in websphere 10. Thanks for any help and advice.