I have problem accessing my statless ejb bean from my web layer.
My ear contain 1 war called myapp.war and 1 jar (EJB3) called myejb.jar.
In my application.xml, I have specify myapp.war as web module and myejb.jar as ejb module.
I have implement both local and remote for my stateless ejb3.
I deploy my application on Jboss4.0.5GA. it deployed successfully. I check my jndi tree from jmx-console, I can see my ejb3 has been deploed succesfully (both local and remote).
I try to call my ejb3 from my web layer as local ejb, it throw exception :
Invalid invocation of local interface (null container). From the exception, it seems like myapp.war and myejb.jar has been deployed from two different JVM but Both of them has been packaged in an ear file and it was deployed in the same JBOSS.
I try to call as remote ejb from my web layer and it works fine.
I try to call from my ejb layer as local (call one ejb from another ejb), it works fine.
my ear structure:
| --- META-INF
| ------ application.xml (State myapp.war as web apps and myejb.jar as EJB3)
| --- MyApp.war
| |------ WEB-INF
| | |
| | ------ web.xml
| | ------ .......... <faces-config.xml , etc>
| |------ ....... <properties file, etc>
| --- myejb.jar
| | --- META-INF
| | |
| | | -- persistence.xml
| | --- ...... <class>