Skip to main content

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

Hi Hubert,

 

Yes, I’ll take a look at it. I don’t think I’ve got a testcase for the combination of composition and autowire… apparent oversight on my part.

 

Thanks,

Joel

 


The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.


From: cosmos-dev-bounces@xxxxxxxxxxx [mailto:cosmos-dev-bounces@xxxxxxxxxxx] On Behalf Of Hubert H Leung
Sent: Thursday, January 31, 2008 5:07 PM
To: cosmos-dev@xxxxxxxxxxx
Subject: [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