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
- relates to
-
PICO-188 Support mutual dependencies for setter injection components
Activity
Jörg Schaible
made changes -
Jörg Schaible
made changes -
Fix Version/s | 2.0 [ 10411 ] | |
Environment |
Michael Rimov
made changes -
Fix Version/s | 2.0 [ 10411 ] | |
Fix Version/s | 2.2 [ 14251 ] |
Michael Rimov
made changes -
Fix Version/s | 2.2 [ 14251 ] | |
Fix Version/s | 2.3 [ 14303 ] |
Paul Hammant
made changes -
Resolution | Won't Fix [ 2 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
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