Perhaps slightly off-topic, but I'm seeing an error in JBoss and want to check with this community first to see if it's a spec violation instead.
WITHOUT COMMENTING ON THE DESIGN, if it can be avoided, since it's not mine and I don't yet understand why these choices were made, and focusing solely on what the EJB specification permits, is the following legal:
XInterface
XBean implements XInterface (remote, as it happens; shouldn't matter)
YInterface
YBean implements YInterface
XBean has:
@EJB
private YInterface y;
YBean has:
@EJB
private XInterface x;
This is not strictly speaking circular, but JBoss blows up at deployment time that suggests that circularity is involved. I am wondering if that is because this is a specification violation, or because JBoss 6 M3 has a problem here.
And now the stuff that I don't think matters:
The beans are in their own jar files.
The interfaces that the beans implement are in THEIR own jar files.
Everything is in the lib directory of an ear.
Thanks,
Laird
Not a spec violation in your code, but a known issue in JBoss AS-5/6. See this for details http://community.jboss.org/message/532404#532404