annotations - Failed to inject EJB using OpenEJB in Junit -


i decided use tomee openejb in junit test because ibm's embeddedejbcontainer limited. example, doesn't support mdb.

so, added number of dependencies maven pom.xml , got necessary openejb jars test code. in beforeclass method created embeddedcontainer:

testejbcontainer = ejbcontainer.createejbcontainer(); 

and successful. so, thought @ejb annotation injection work. didn't. went on interrogate jndi contexts used openejb. found ejb reference bounded in following sub-contexts like:

"java:global/mymodule/myejb!com.company.dept.myejb" , "java:global/mymodule/myejb"

so, there. however, @ejb annotation injection failed. so, went on search tomcat annotation implementation ejb annotation method. wasn't able find that.

wondering may wrong here. few things can think of:

  1. the jar containing @ejb annotation openejb not called. is, other jar implementing javax.ejb.ejb intercepted tomcat's call.
  2. the subcontext name wrong.

i wanted bind myejb reference myself jndi context injection work not able match actual sub-context name. please point me right direction?

sincerely,

student_101


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -