Regards,
Earl
At 17:36 5/2/2001 +0200, you wrote:
Hi everybody,
I am trying to disconnect my webserver from my ejb server. Up to now, I have only worked with Orion as web + ejb server.
I decided 2 days ago to experiment the separation of both servers.
In order to carry out this experiment, I first tried to access my ejb (still sitting on the orion Ejb server) from an simple client application.
This works fine.
I have just to set these following properties :
-Djava.naming.provider.url="ormi://localhost/demo"
-Djava.naming.factory.initial="com.evermind.server.ApplicationClientInitialContextFactory"
-Djava.naming.security.principal="superadmin"
-Djava.naming.security.credentials="superadmin"
where demo corresponds to demo.ear ...
So, I tried to do the same from a jsp client sitting on Tomcat. I launched my tomcat webserver with the same previous system properties.
In my jsp (the code is similar to the one I put in my simple client application), I am creating as usual my initial context and I am doing my lookup
to get my ejb home ...
Context iContext = new InitialContext(env);
Object object = iContext.lookup( "java:comp/env/whip/ejb/find/memberfinder" );
where I do this, I get the following exception :
javax.naming.NamingException: java:comp/env namespace is only available from within a J2EE component
It seems to be a fair error because in the J2EE spec, it is written that the beans mapped to the java:comp/env cannot be accessed from outside
a container.
So how can I accessed them from my client application ...!?!?
If I change the code like this:
Context iContext = new InitialContext(env);
Object object = iContext.lookup( "whip/ejb/find/memberfinder" );
I get the following error :
javax.naming.NameNotFoundException: whip/ejb/find/memberfinder not found
So my question is obvious : HOW COULD I GET ACCESS TO MY BEANS ??? With which jndi names ???
Has anyone a clue about this problem.
Thanx a lot for your advises.
Best Regards
Jean-Guillaume LALANNE
Earl Marwil
SCIENTECH, Inc.
1690 International Way
Idaho Falls, ID 83402
208.525.3717