|
Hi,
Thanx for your tip ...
By talking about <ejb-link> stuff ... I got
the idea of using lookupLink() and that was the
solution ...!!!
see u
Jean-Guillaume
----- Original Message -----
Sent: Wednesday, May 02, 2001 7:08
PM
Subject: Re: Calling my EJB from tomcat
webserver
I haven't tried running the web component out of a servlet
container other than Orion yet. The experiments I have run suggest that Orion
maintains a RMI-Context containing the namespaces for ejb, jdbc, jms, ....
First I would try naming your ejb something like ejb/whip/find/memberfinder
and reference it the same way in your web component. If this works, then you
might try using the <ejb-link> tag on the web side to map a web
component name like ejb/my_find to your ejb in question. I would be interested
in knowing how this works out.
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
|