• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cross referencing EJB 3.x

 
Claude Moore
Ranch Hand
Posts: 832
7
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I wonder if cross-referencing of two (or more) EJBs, for example


may create problems or not during server's startup. Theorically, I'll guess no... what do you think about ?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's allowed and will work fine.
 
Claude Moore
Ranch Hand
Posts: 832
7
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, man.
 
Rob Spoor
Sheriff
Posts: 20817
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I have had some problems with this in JBoss, where two beans required references to each other. I had to resolve to injecting a javax.inject.Provider for one of the two.
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was a bug in earlier versions of JBoss AS (prior to AS7) which would cause an issue. But that was bug in the implementation of the server and was fixed in later versions (and there was a workaround for previous versions). The spec allows you to have these kind of injections and as far as I remember it's tested in the TCK too.
 
Claude Moore
Ranch Hand
Posts: 832
7
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your precisation, Rob; anyway I was asking about official specs and I'm not currently using JBoss in this project.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!