Hi, we had this same problem since we are using a lot of beans and they are
deployed almost randomly, so i dont know which bean uses which other bean.
The solution i found (and i dont know if i'm violating the j2ee specs, or
rules :) ) was to add the remote and home interfaces of the beans to the
jboss classpath, so other beans can use them, but load the Bean class using
jndi.
-- Francisco
----- Original Message -----
From: Tom Cook <[EMAIL PROTECTED]>
To: jBoss <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 11:51 PM
Subject: Re: [jBoss-User] EJB-access between packages
> On Wed, 14 Feb 2001, you wrote:
> > Hi,
> >
> > I don't understand the following:
> > If EJB X in package A has to access EJB Y in package B, why do I have to
> > include Y's interfaces (and probably PK-class) in A?
> >
> > Shouldn't X find Y without the include in A when A and B are deployed in
> > the same container?
>
> No.
>
> The classes are loaded with different classloaders so that you can
re-deploy
> one bean without re-deploying the other. A class which is loaded in one
> classloader is not visible in another class-loader, unless the first is an
> ancestor of the second. I guess you *could* get each classloader to look
in
> all the other EJBs to see if the class is there, but that would quickly
end up
> in a horrible mess and would problably hit performance too. So you have
to
> include the interfaces (yes, and the PK class, so findByPrimaryKey will
work)
> in both beans.
>
> Of course, you could use dynamic classloading. If you could get it to
work,
> that is.
>
> Tom
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]