Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 1.0-RC-1
-
Fix Version/s: 2.3
-
Component/s: PicoContainer (Java)
-
Labels:None
-
Number of attachments :
Description
Right now when you use the SICA on a bean which has setters other than those which match to components it throws an exception. This is undesirable behavior as quite frequently a bean will have a mix of component setters and normal setters.
[editorial]
Yes, SI is a hack, but it is a useful one in some places.
[/editorial]
Issue Links
| This issue relates to: | ||||
| PICO-188 | Support mutual dependencies for setter injection components |
|
|
|
Hi Brian,
this is a design question. Pico's main task is to resolve any dependency of a component. SI maps this behaviour to a JavaBean. So any setter found by reflection is supposed to be a dependency, that must be resolved. The implementation has to assume, that the bean is only properly initialized, if any dependency introduced by setters is resolved.
IMHO you have not a proper JavaBean in your situation. You may introduce an additional ctor with all the necessary dependencies and use a CI for this hybrid.
Regards,
Jörg