Can we deploy two ejbs with same JNDI name in separate ears

Showing Answers 1 - 3 of 3 Answers

Sanket Desai

  • Jan 29th, 2006
 

Yes we can.As long as those 2 ear files are not deployed on the same app server or in the same cluster. If that happens, there would be a 'naming' conflict & would fail the deployment.

  Was this answer useful?  Yes

ashruf

  • Mar 22nd, 2006
 

Hi,

Atleast in theory I think it should be possible to have two EJBs having same JNDI name, each being part of separately deployed EAR application. I dont have proof as of now.

Also I think namespace concept comes into picture, wherein ear name acts as a qualifier.

Please correct me if I am wrong. Provide sample if you have any.

-ashruf

  Was this answer useful?  Yes

Manivannan Palanichamy

  • Aug 23rd, 2006
 

I dont think its correct; because, the JNDI is a global naming service, not per individual application. So, the the ejb name should be in different name-space at the least.

For example, there may be name spaces like this,

bean1, my/bean1, mine/bean1 and etc.

Please, some correct me if my guess is wrong.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions