Hi Vimalan,
               This is because of the ClassLoader will always try to
load a class from the highest parent classloader. This means first the
ejb class is looked up in the parent classloader ie first EAR.
You can use the hidden-classes tag to hide classes in the parent class
loader. Its usage can be got from Aarons book.

Thanks
Manu

On 10/4/06, Arunanthisivam Vimalathithen <[EMAIL PROTECTED]> wrote:
Hi,

I am running into some problems in the following scenario. I am deploying
two different EARs in which among other EJBs there is the same local EJB
(same class). Only the JNDI name of this local EJB differs in these EARs. I
am able to refer to the correct local EJB in the second EAR by using ejb-ref
and the JNDI name in other application servers (namely WebSphere) and this
works fine.

But the problem in Geronimo is that I have to make the second EAR dependant
on the first EAR as the second EAR is dependent on some artifacts in the
first EAR. Now whenever I try to refer to the local EJB in the second EAR,
the EJB that gets looked up is the local EJB from the first EAR. Even when I
have changed the ejbname of the local EJB in the second EAR and reflected
that change in the ejb-link, the EJB that keeps getting looked up is the EJB
from the first EAR.

This causes some serious problems in the application as some initializations
are going on in the child EAR that is not refletected in the EJB from the
parent EAR that is getting called. Is there any way around this?

I have attached a sample scenario with this, the local EJB only differs in
the attached EARs slightly to display different messages to illustrate this
scenario.

This was tested in Geronimo 1.0 and 1.1.1.

Thanks and regards,

Vimalan




Reply via email to