Hi Tomasz,
I had a look through the spec and it is unfortunately quite explicit in ruling
out your scenario :(
From the spec (121.5.7):
name – The name of the bean property. This name refers to the set method on the
constructed object as specified in the design pattern for
beans getters and setters, see [6] Java Beans Specification. For example, if
the property name is foo, then the public method setFoo(arg) will be used to
set the value. There must only be one set method with a single argument for a
specific property, that is, overloading of properties is not allowed.
So the behaviour is correct and not a bug I think.
Regards,
Valentin
On 19 Jul 2010, at 16:04, Tomasz Chodakowski wrote:
> Hello,
>
> I've tried deploying simple blueprint-enabled bundle, however it looks
> like Aries blueprint implementation fails to inject a property with
> overloaded setter method. I am getting following error:
>
> [Blueprint Extender: 3] ERROR
> org.apache.aries.blueprint.container.BlueprintContainerImpl - Unable to
> start blueprint container for bundle Fusion-RESTApp
> org.osgi.service.blueprint.container.ComponentDefinitionException:
> Unable to find property descriptor inboundRoot2 on class
> com.ovi.music.fusion.rest.app.RestApplication
> at
> org.apache.aries.blueprint.container.BeanRecipe.getPropertyDescriptor(BeanRecipe.java:799)
> at
> org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:765)
> at
> org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:742)
> at
> org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:723)
> (...)
>
> with the property setters listed below:
>
> public void setInboundRoot2(Restlet inboundRoot) {
> (...)
> }
>
> public void setInboundRoot2(int i) {
> (...)
> }
>
>
> The situation doesn't seem to depend on these particular signatures it's
> the fact that the setter method is overloaded that causes problems. It
> works otherwise (ie: when setter method is not overloaded).
>
> Is this a bug or just me?
>
> Tomasz
>
>