I've seen very many post, and i googled a lot but i'm not able to get out of this problem.
I have an EJB module deployed on a glassfish v 3.1.2, and i want to access it by a tomcat v 7. There seems to be no problem when the servers runs on the same host, but when they are on different hosts(namely different machines) raises very many problems. Even with two glassfish servers.
I followed http://technology.amis.nl/2006/10/20/connecting-to-an-ejb-30-remote-sessionbean-from-tomcat/
and a lot of other similar link that can be found also here in the stackexchange, that i will not report here because they all suggest the same thing, that is:
put this lines of codes in your code, ie a servlet:
Properties props = new Properties(); props.put("java.naming.factory.initial","com.sun.enterprise.naming.SerialInitContextFactory"); props.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming"); props.put("java.naming.factory.state","com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl"); props.setProperty("org.omg.CORBA.ORBInitialHost", "10.23.2.150"); props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
And also many of you suggest to include in the path the:
- gf-client of glassfish (do you evermind that on tomcat i may not be able to refer to the glassfish libraries)
- or all the libraries which refers to the gf-client (close to 10 mega of files)
but the does't work..
I still get the initialcontext directory not found problem..
May you suggest me any solution? may you suggest me any step by step "tutorial" to follow in order to make everything work out?
if you need any piece of the code or the complete error just answer me please, is almost 1 week i'm trying to resolve this problem..
thank you very much indeed