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