Hi,
I have created an osgi bundle where the bean to expose as a service is
defined in a spring file :
<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="brokerURL"
value="vm://localhost:61616?create=false" />
</bean>
<osgi:service id="activemqservice" ref="activemq"
auto-export="all-classes"/>
The service is well published. See the log here after.
13:18:42,058 | DEBUG | xtenderThread-16 | OsgiBundleXmlApplicationContext |
ractOsgiBundleApplicationContext 247 | Registering BundleContext as a bean
named bundleContext
13:18:42,058 | DEBUG | xtenderThread-16 | WaiterApplicationContextExecutor |
WaiterApplicationContextExecutor 218 | Pre-refresh completed; determining
dependencies...
13:18:42,058 | DEBUG | xtenderThread-16 | DependencyServiceManager |
startup.DependencyServiceManager 253 | Discovered local dependency
factories: []
13:18:42,074 | DEBUG | xtenderThread-16 | DefaultListableBeanFactory |
ort.DefaultSingletonBeanRegistry 214 | Creating shared instance of
singleton bean 'activemqservice'
13:18:42,074 | DEBUG | xtenderThread-16 | DefaultListableBeanFactory |
ractAutowireCapableBeanFactory$1 383 | Creating instance of bean
'activemqservice'
13:18:42,074 | DEBUG | xtenderThread-16 | DefaultListableBeanFactory |
stractAutowireCapableBeanFactory 459 | Eagerly caching bean
'activemqservice' to allow for resolving potential circular references
13:18:42,105 | DEBUG | xtenderThread-16 | CachedIntrospectionResults |
beans.CachedIntrospectionResults 151 | Not strongly caching class
[org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean]
because it is not cache-safe
13:18:42,105 | DEBUG | xtenderThread-16 | DefaultListableBeanFactory |
stractAutowireCapableBeanFactory 1367 | Invoking afterPropertiesSet() on
bean with name 'activemqservice'
13:18:42,105 | DEBUG | xtenderThread-16 | DefaultListableBeanFactory |
ractAutowireCapableBeanFactory$1 411 | Finished creating instance of bean
'activemqservice'
13:18:42,105 | INFO | xtenderThread-16 | DependencyServiceManager |
startup.DependencyServiceManager 278 | Adding OSGi service dependency for
importer [&activemqservice] matching OSGi filter
[(objectClass=org.apache.activemq.camel.component.ActiveMQComponent)]
Unfortunately, the osgi bundle who will consume the osgi:service
<osgi:reference id="activemqservice"
interface="org.apache.activemq.camel.component.ActiveMQComponent" />
generates an error
13:18:42,105 | DEBUG | xtenderThread-16 | DependencyServiceManager |
startup.DependencyServiceManager 226 | 1 OSGi service dependencies, 1
unsatisfied (for beans [&activemqservice]) in
OsgiBundleXmlApplicationContext(bundle=reportincident.interfaces,
config=osgibundle:/META-INF/spring/*.xml)
13:18:42,105 | INFO | xtenderThread-16 | DependencyServiceManager |
startup.DependencyServiceManager 232 |
OsgiBundleXmlApplicationContext(bundle=reportincident.interfaces,
config=osgibundle:/META-INF/spring/*.xml) is waiting for unsatisfied
dependencies [[&activemqservice]]
13:18:42,105 | DEBUG | xtenderThread-16 | WaiterApplicationContextExecutor |
WaiterApplicationContextExecutor 257 | Registering service dependency
dependencyDetector for
OsgiBundleXmlApplicationContext(bundle=reportincident.interfaces,
config=osgibundle:/META-INF/spring/*.xml)
13:18:42,121 | DEBUG | xtenderThread-16 | DependencyServiceManager |
startup.DependencyServiceManager 297 |
OsgiBundleXmlApplicationContext(bundle=reportincident.interfaces,
config=osgibundle:/META-INF/spring/*.xml) has registered service dependency
dependencyDetector with filter:
(objectClass=org.apache.activemq.camel.component.ActiveMQComponent)
What is the cause of this issue ? Do I have to change something in my
MANIFEST file ?
-----
Charles Moulliard
SOA Architect
My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
--
View this message in context:
http://www.nabble.com/1-OSGi-service-dependencies%2C-1-unsatisfied-%28for-beans---activemqservice-%29-in-OsgiBundleXmlApplicationContext-tp22537014p22537014.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.