Hi,

I'm reviewing our support for autowiring and found out there is an issue with our Composite/Component/ComponentReference models.

By the assembly spec, there is difference between the following two cases:

a) <component name="C1">
b) <component name="C1" autowire="false">

Case a) will inherit the autowire from the containing composite while case b) will override the one from the composite.

In the current code, we use a boolean to represent the setting in Composite/Component/ComponentReference interface and it cannot reflect the null value. I propose that we make the following changes:

1) Change the method "void setAutowire(boolean autowire)" to "void setAutowire(Boolean autowire)". Thanks to the JDK5 autoboxing, this will not break any existing code.
2) Change the implementation of isAutowire() to default null value to false.
3) Add a new method to "Boolean getAutowire()" to the Composite/Component/ComponentReference 4) Update the CompositeProcessor and CompositeConfigurationBuilderImpl to read/propagate the autowire settings correctly.

I have all these changes working locally. If there's no objections, I'll check in the code soon.

Thanks,
Raymond

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to