users@glassfish.java.net

EJB spec question

From: <glassfish_at_javadesktop.org>
Date: Wed, 30 Jun 2010 09:36:38 PDT

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 or yet another bug in Glassfish's main competitor. :-)

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 (not Glassfish) blows up at deployment time in a typically obscure fashion that suggests that circularity is involved. I am wondering if that is because this is a specification violation, or because JBoss 6 M3 still has a long way to go. :-)

(I'll see if the developer in question can deploy to Glassfish just for comparison purposes.)

Thanks,
Laird
[Message sent by forum member 'ljnelson']

http://forums.java.net/jive/thread.jspa?messageID=476433