In my ear file, I have 2 ejb3's jar and 1 war file. I have specify that in my application.xml. My app server Jboss4.0.5GA.
I implement both remote and local for my ejb3 (all stateless bean).
1. When I try to call one of my ejb as local ejb from my web layer, it throw javax.ejb.EJBException: Invalid invocation of local interface (null container). This exception is thrown when I call one of the method in the interface. I did make null check before calling any method in the interface( basically after called lookup method in InitialContext). But if I called as remote ejb, it works fine. Since I deploy both ejb and web in the same JBOSS, I expected I am able to call my ejb as local ejb. Any idea about this?
2. Since I have 2 ejb3 jar, I try to called any ejbbean from one ejb jar to another ejb jar as local bean, it works fine. Any idea, why I can't call any ejb bean as local ejb from my web layer? I did make null check before calling any method in the interface( basically after called lookup method in InitialContext).
I have checked through jboss jms-console (http://localhost:8080/jmx-console --> service=JNDIView --> click on the Invoke button beside the list() method), I can see my EJB Bean as Local and Remote in the JNDI Tree.
thank you in advance