The java:comp/env/ejb namespace is available from anything running in the
JBoss environment, not just something in an ear. I use it when one EJB
wants to call another EJB.
----- Original Message -----
From: "Joost v.d. Wijgerd" <[EMAIL PROTECTED]>
To: "Richard Doust" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, November 16, 2001 3:33 AM
Subject: RE: [JBoss-user] EJB in ear referencing EJB outside of ear
Hi,
If you deploy a bean outside an ear file (e.g. as a bean-jar not
as another ear file) you can reference the bean only with it's JNDI
name.
You can't user java:comp/env/ejb namespace bacause that can only be
used within one enterprise archive. So if the jndi name of your bean is
"MyBean" then just call InitialContext.lookup("MyBean") and you'll be
alright. (at least I am when I do this). If the problem persists, maybe
you can provide a stacktrace for the CommunicationException..
cheers,
JOost.
-----Original Message-----
From: Richard Doust [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 16, 2001 4:51 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] EJB in ear referencing EJB outside of ear
Hi.
I'm confused by the J2EE Spec. I know it's possible for an EJB packaged
in a
jar and deployed inside of an ear to reference an EJB that does not
exist
inside the ear.
I have gone from packaging all EJBs inside the ear to deploying one
externally, (on my way to deplolying most of them externally), so that a
different application deployed in the same container can access the EJBs
without having to have the EJBs packaged inside two different ears. I've
modified my deployment descriptors according to the specification, and
when
I run JBoss, the JNDIView shows me that all of the namespaces are
established as I would expect. Yet, when I try to access the externally
deployed EJB from an EJB inside the ear (doing a lookup on its Home
using
InitialContext), I get a CommunicationException. From the description,
it
seems like a weird exception to have. If anyone is interested in trying
to
help me figure this out, I could provide more details.
Thanks.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user