Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why an InitialContext on Remote EJB3 Session Beans

Why do I need to specify various driver info when I call a remote EJB?

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=localhost:1099

Shouldn't we only need to specify the url/port and the EJB container should resolve all that other stuff?

like image 688
arinte Avatar asked Nov 14 '22 17:11

arinte


1 Answers

Because all the EJB containers not use the same properties. This properties was for Jboss containers.

By example Glassfish use this properties:

java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
java.naming.factory.url.pkgs=com.sun.enterprise.naming
java.naming.factory.state=com.sucn.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
org.omg.CORBA.ORBInitialHost=localhost
org.omg.CORBA.ORBInitialPort=3700
like image 161
rresino Avatar answered Dec 15 '22 06:12

rresino