Hi,

I ran across a very interesting problem with circular injection (and is looking 
for a better way to resolve it).

I have two stateful session beans (A and B) . In A I do a @In(create=true) 
private B b while in B I inject A @In(create=true) private A a (Please dont ask 
why ;-)

 My impression is that when I call A, it injects B, which in turns injects A, 
which in turn injects B etc. until things go slightly wrong.

I have resolved it by changing the injection of B (in A) to @In(create=false, 
required=false) private B b and then later (in the method where I actually need 
access to B from A) I do a b = (B)Component.getInstance("b",true);

Any suggestions as to try and prevent this circular injection ?

Thanks

Louis


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3947684#3947684

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3947684


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to