Hi,
the naming context "java:comp/env" is the environment made available to
enterprise beans by the container.
Unless you've got a J2EE client container which makes such an environment
available to your client application, you will not be able to access an EJB
component this way. JOnAS only provides an EJB container, not a client
container. Thus "homes" should be accessed as illustrated in the JOnAS
examples, i.e. through their jndi-name specified in the JOnAS specific
deployment descriptor. Moreover, "java:comp/env/ejb/SimpleSavingsAccount"
usually corresponds to an EJB reference, which means that somewhere in your
deployment descriptor you have specified an ejb-ref element, which maps
your reference name "ejb/SimpleSavingsAccount" to your actual EJB
component.
Best Regards,
Fran�ois
Diane Weiss wrote:
> I came upon your answer to the java:/comp/env/ problem when I was
> attempting to try the examples in the J2EETutorial put out by Sun. The
> example does indeed create an Application Client running outside of the
> J2EE. Mine also fails (probably due to a typo in deploytool screens).
> The client fails to obtain an objref in the following:
>
> Context initial = new InitialContext();
> Object objref =
> initial.lookup("java:comp/env/ejb/SimpleSavingsAccount");
>
> Please give me some insight.
>
> Diane Weiss
--
==================================================================
Fran�ois EXERTIER Evidian (Groupe Bull)
1, rue de Provence, BP 208, 38432 Echirolles cedex, FRANCE
mailto:[EMAIL PROTECTED]
http://www.evidian.com/jonas http://www.objectweb.org/jonas
Tel: +33 (0)4 76 29 71 51 - Fax: +33 (0)4 76 29 77 30
==================================================================
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".