-
1. Re: Circular injection problem
eekboom May 30, 2006 11:01 AM (in response to lcoetzee)I fell for that problem, too.
IMHO the Seam docs should prominently include some advice on application structure/layering to avoid this.
That's also the only suggestions I can make: Restructure your application and introduce clean layering to avoid any circular or overly complex dependencies. (So I'm afraid I have to ask why you want A and B to have a circular dependency.)
I think it's best to have a first layer that is accessed by JSF: Components for action handlers and data models. Action handlers can of course have data models or entity beans injected, but not other action handers.
If needed add some lower layers that can for example handle persistence or business logic.
But I'd very much like to hear opinions of more experienced Java EE/Seam developers. -
2. Re: Circular injection problem
gavin.king May 30, 2006 2:21 PM (in response to lcoetzee)So you get a stack overflow?
If so, then please submit a test case to JIRA. -
3. Re: Circular injection problem
lcoetzee May 31, 2006 7:52 AM (in response to lcoetzee)Added a test case/sample app in Jira.
http://jira.jboss.com/jira/browse/JBSEAM-244
Louis