3

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

LMG
  • 966
  • 1
  • 12
  • 28
  • I'm in the same boat, except trying to use tomcat 6.0.18. Did you ever find a solution for this? – Jeff May 22 '13 at 17:54
  • jeff please follow link in the following answer – LMG May 24 '13 at 07:29
  • Thanks, already solved my particular problem: http://javahowto.blogspot.com/2011/06/tomcat-to-glassfish-remote-ejb.html – Jeff May 31 '13 at 12:53

1 Answers1

0

TO JEFF: I found out solution and here is it: Hi i really suggest you to follow this Java for the web

I maintain this blog together with a colleague of mine. I think this should work also for tomcat 6.

I hope this will work! let us now how does it proceed.

LG

LMG
  • 966
  • 1
  • 12
  • 28