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:
XBean implements XInterface (remote, as it happens; shouldn't matter)
YBean implements YInterface
private YInterface y;
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.