[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[virgo-dev] Cannot inject blueprint environment managers using gemini
|
folks,
I've defined a blueprint xml with 'blueprintContainer' and 'blueprintBundleContext' environment managers:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
<bean id="referenceManager" class="com.acme.ReferenceManager">
<property name="context" ref="blueprintBundleContext" />
<property name="container" ref="blueprintContainer" />
</bean>
<reference id="acmeService" interface="com.acme.AcmeService" timeout="10000">
<reference-listener ref="referenceManager" bind-method="bind" unbind-method="unbind" />
</reference>
</blueprint>
I define the ReferenceManager class as:
public class ReferenceManager {
private BundleContext ctx;
private BlueprintContainer bc;
public void setContext(BundleContext ctx) {
this.ctx = ctx;
}
public void setContainer(BlueprintContainer bc) {
this.bc = bc;
}
public void bind(ServiceReference ref) {
System.out.println("<<< Binding service reference: " + ref + " >>>");
}
public void unbind(ServiceReference ref) {
System.out.println("<<< Unbinding service reference: " + ref + " >>>");
}
}
When I deploy my bundle to the pickup directory of Virgo (tomcat server 3.5.0 / Gemini Blueprint 1.0.0.RELEASE) I have received the following errors:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'blueprintBundleContext' is defined
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'blueprintContainer' is defined
I have confirmed these beans are added in the gemini code (here), but it doesn't seem to work for me.
Is this a bug or am I missing some blueprint configuration?
Thanks!
Anthony Bargnesi