]
Pete Muir reopened JBSEAM-3362:
-------------------------------
This fix is in essence correct however
1) The contextual information in CyclicDependencyException isn't getting printed in
all circumstances (see wiki tests in 2.0 branch)
2) The fix doesn't take account account of the fact that injecting with required=false
should be allowed when a dependency is cyclic (the injection should fail silently I
think)
Detect cyclic dependencies and throw exception
----------------------------------------------
Key: JBSEAM-3362
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3362
Project: Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.3.CR1, 2.1.0.BETA1
Reporter: Matt Drees
Assignee: Matt Drees
Priority: Minor
Fix For: 2.0.3.CR2, 2.1.0.CR1
Imagine a scenario like this. Some client calls someMethod() on a component called Foo.
BijectionInterceptor tries to inject Foo's @in attributes, one of which requires
calling a factory method on Bar. Bar's factory method in turn calls
Foo.someOtherMethod(). Foo is not in a state where it can support method calls, because
it is in the process of injecting dependencies, so this sort of cyclic dependency should
not be allowed. Seam should throw an exception in this case.
BijectionInterceptor used to be coded such that someOtherMethod() would run without any
complaints, and any @In attributes may or may not be null, depending on which fields were
injected first. Recent changes to BijectionInterceptor (for JBSEAM-3295) have changed
this behavior, and now an finite loop results. Neither of these behaviors is desirable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: