0 Replies Latest reply: May 9, 2012 11:03 AM by Michael G RSS

how use module name binding for EJB lookup AS7.1?

Michael G Novice

Hello,

 

I'm having some issues with accessing my EJBs from my web app which are all deployed inside an ear using the name bind that uses module in the name, ex:

     "java:module/ResourceControllerBean!com.resource.controller.beans.ResourceControllerBean"

 

When my webapp and ejb jar isn't deployed inside an EARi can use the module named binding but inside it seams i can't use it.  I can use the app binding and i haven't tried the global but both of these contain names with the app(jar that is is packaged in) and the ear name which makes lookup more specific than just looking up by bean name.

     ex: "java:app/resouce1.2/ResourceControllerBean!com.resource.controller.beans.ResourceControllerBean"

           "java:global/ResPlanEar/resouce1.2/ResourceControllerBean!com.resource.controller.beans.ResourceControllerBean"

 

These names are undesireable because if i change the ear name or the jar version is incremented then the app would need to change.

 

What is the best, proper approach to look up the EJB inside the ear, CDI and deployment xml???

 

Thanks