[jboss-user] [EJB 3.0] - Dependency Injection @EJB in separate jar

vri_97 do-not-reply at jboss.com
Fri Dec 21 03:29:46 EST 2007

I have two jar, eg: ABC.jar dan DEF.jar. 
In ABC.jar I have a class that one of the attribute is an EJB in DEF.jar.

example :
in ABC. jar :
I have class MyClassInABC, with one of the attribute:
  private MyClassInDEF ejb;

MyClassInDEF reside in DEF.jar.

If I deploy the ABC.jar and DEF.jar at the same time, there will be java.lang.NoClassDefFoundError. But if I deploy DEF.jar, then deploy ABC.jar manually, it works properly. 
I guess it was failed because JBoss can not find MyClassInDEF bean when trying to inject it.

Would it possible to define a dependency in my ABC.jar ? so it will be deployed only AFTER DEF.jar successfully deployed ?


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

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

More information about the jboss-user mailing list