Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cosmos-dev] problem with using autowire and ComposableManagedCapabilitySet together with new annotation


Hi Joel,

I'm having a problem withe the new annotation code.  I added the description capability by jusing the new composability feature like this:
@ComposableManagedCapabilitySet(set={DescriptionImpl.class})
public abstract class AbstractDataManager implements IDataManager {

After adding the annotation above, the variable that's annotated with @ManagedFrameworkAutowire(name="WSDM") becomes null.  

@ManagedFrameworkAutowire(name="WSDM")
    private Binding wsdmBinding;

    public void setWsdmBinding(Binding wsdmBinding){
            this.wsdmBinding = wsdmBinding;
    }

        Object resourceObject = wsdmBinding.getBindingForObject(this);  <-- NPE here, wsdmBinding is null.  

If I remove the @ComposableManagedCapabilitySet annotation, the wsdmBinding variable gets the WSDMBinding object.  

Can you help me with this problem?  You can see the code in the AbstractDataManager.java file.  

Thanks,
_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382

Back to the top