Hi, I am using EJB 3 with annotation. I have one local interface and bean class. I want to access this EJB in different application which is deployed in same application server. When i am using
public TestEjbInterface testInterface
in any servlet or any EJB session bean from different applicaiton, i am able to get the values but when i am trying to do JNDI look up in POJO class to get TestEjbInterface i am getting Naming exception. I cannot do dependency injection in POJO class as POJO class is not managed by the server.
What is the way to get local ejb which is running in different applicatioin in same applicaiton server in POJO class. If i am using remote interface, i am able to do jndi names.
I am using glassfish application server.
If local interface EJB is not accessible outside the application , then why i am able to get this by using Dependency injection in some servlet or EJB , which are in diff. applicaiton.
Thanks Pallav, but still it is not clear to me. Can you give me some sample example or how to define global JNDI names and where.
My another doubt is that , as per my understanding local interface ejb should not be accessible out side of the applicaiton, then how i am able to access this ejb in differnet application using dependency injection.
subject: how to access one ejb with local interface from different application deployed in same server.