cancel
Showing results for 
Search instead for 
Did you mean: 

Error in calling an EJB from another EJB

Former Member
0 Kudos

Hello All,

I have a scenario where i need to call a method of an ejb from another ejb.

Both the EJB's are in different DC's.

EG: DC1 using DC2

I have added the public part of DC2 in DC1.

The following code is written in DC1 to access the EJB of DC2

MyRemote l_remote;

MyHome l_home;

InitialContext l_ctx = new InitialContext();

>> l_home = (MyHome)l_ctx.lookup("JNDI Name");

l_remote = (MyRemote)l_home.create();

There is no error at build time and deploy time, but at run time "MyHome" class is not found.

Even i am not able to access the helper class defined in the DC2 at runtime.

Please help.

Thanks in Advance

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

First off, wrong forum section.

Check if your JNDI name is correctly placed for the bean you're calling -- check j2ee-engine.xml for that. Check the EJB container if the ear file you deployed is there and updated.

Try placing "localejbs/JNDI name" on your lookup parameter.

Regards,

Jan