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:
- the jar containing @ejb annotation openejb not called. is, other jar implementing javax.ejb.ejb intercepted tomcat's call.
- 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
Post a Comment