Hello,
We try to migrate a big glassfish application to jboss, but we have a blocking issue with
cyclic depencies on EJB3.
The JIRA EJBTHREE-792 identified this issue as resolved thru the @IgnoreDependency
annotation.
This is not so simple - this does not work for us at all.
I explain :
First at all it does not work at all for ejb-jar.xml deployment descriptor file.
There is no standard annotation IgnoreDepency even in jboss.xml, the jboss "not in
spec" descriptor file.
We then try to move the ejb-jar.xml injection into the code directly with the @EJB
annotations as indicated in EJBTHREE-792 .
It works for very simple code with @EJB injection without name references.
But if you add name parameters it does not work anymore. We need parameters to @EJB to
specify implementation. (our Glassfish code use this)
You can try with this simple code :
Hello1Bean class:
@EJBs(
{ @EJB(name="ejb/Hello2", beanInterface=Hello2.class,
beanName="Hello2Bean")
})
public @Stateless class Hello1Bean implements Hello1 {
@IgnoreDependency
@EJB(name="ejb/Hello2")
private Hello2 hello;
Hello2Bean Class :
@EJBs(
{@EJB(name="ejb/Hello1",
beanInterface=Hello1.class,beanName="Hello1Bean")
})
public @Stateless class Hello2LocalBean implements Hello2Local {
@IgnoreDependency
@EJB(name="ejb/Hello1")
private Hello1 hello;
You then get the following dependency error :
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:jar=cyclic.jar,name=Hello2Bean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
jboss.j2ee:jar=cyclic.jar,name=Hello1Bean,service=EJB3
Depends On Me:
jboss.j2ee:jar=cyclic.jar,name=Hello1Bean,service=EJB3
ObjectName: jboss.j2ee:jar=cyclic.jar,name=Hello1Bean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
jboss.j2ee:jar=cyclic.jar,name=Hello2Bean,service=EJB3
Depends On Me:
jboss.j2ee:jar=cyclic.jar,name=Hello2Bean,service=EJB3
We have the problem in both 4.2.2 & 5.0Beta3 versions.
We have currently no solution,no working workaround.
Need help,
thanks,
Olivier
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156424#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...