I have servlet web application and want to inject apache karaf bundles as a service in the web application using aries blueprint.
These are the Steps followed for injecting the bundles:
1) added reference tag with id and interface values in the blueprint.xml sample code is here
<reference id="jsonStore" interface="com.test.test.jsonstore.service.JsonClientStore" />
2) added bean tag with ref attribute as reference id, of bundles what we are injecting in the blueprint.xml file. sample code is here
<bean id="echo" class="com.test.test.core.jsonrequest.JsonServlet">
<property name="jsonStore" ref="jsonStore"/>
</bean>
3) blueprint.xml file location as context-param tag the web.xml. sample code is here
<context-param>
<param-name>blueprintLocation</param-name>
<param-value>OSGI-INF/blueprint/blueprint.xml</param-value>
</context-param>
4) added listner class in the web.xml. sample code is here
<listener>
<listener-class>org.apache.aries.blueprint.web.BlueprintContextListener</listener-class>
</listener>
5) @Inject annotation for injecting the particular bundle in the servlet class. sample code is here
@Inject(ref="jsonStore")
JsonClientStore jsonStore = null;
The following link is for reference documentation http://aries.apache.org/modules/blueprintweb.html
Still the bundles are not injected please some one can help on this ?
how to inject these karaf bundles as a service to the servlet application?
com.test.test.jsonstore.service.JsonClientStore
service? – Alessandro Da Rugna