[jboss-user] [EJB 3.0] - EJb3 local question

pdtp do-not-reply at jboss.com
Wed Nov 14 19:42:38 EST 2007


Hi...

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:

anonymous wrote : myApp.ear
  |    |
  |    | --- 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
  |    |          | 
  |    |          | --- ...... 
  | 


Any Idea??

Thanks

Pdt

   

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104811#4104811

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104811



More information about the jboss-user mailing list