|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Blueprint and late servicesHi,
I have two bundles, where one bundle exports a service using blueprint. The second bundle export services through a managed service factory and felix fileinstall configuration files. These load some seconds after the start of the application, as I would expect. The first service never gets exported though, because the blueprint reference to the other service. When I don't make a reference to he other service, the first service gets created. I tried using these methods to reference the other service: - <property name="**"><reference interface="*.*.*"/></property> - <reference interface="*.*.*"><registration-listener ref="firstService"/> but to no avail. Even when I set the availablility to optional the first service is never started. Is there a way to specify a service reference in blueprint to a service that gets created very late in the startup cycle? Regards, Leen |
|
|
Re: Blueprint and late servicesThe service will be registered in the OSGi registry as soon as all its
mandatory dependencies are satisfied. If you turn on logging (or event admin), you should see the events fired for the blueprint bundle. One of those should be a GRACE_PERIOD event and contain the missing references. On Thu, Nov 5, 2009 at 20:17, Leen Toelen <toelen@...> wrote: > Hi, > > I have two bundles, where one bundle exports a service using blueprint. The > second bundle export services through a managed service factory and felix > fileinstall configuration files. These load some seconds after the start of > the application, as I would expect. > > The first service never gets exported though, because the blueprint > reference to the other service. When I don't make a reference to he other > service, the first service gets created. I tried using these methods to > reference the other service: > > - <property name="**"><reference interface="*.*.*"/></property> > - <reference interface="*.*.*"><registration-listener ref="firstService"/> > > but to no avail. Even when I set the availablility to optional the first > service is never started. Is there a way to specify a service reference in > blueprint to a service that gets created very late in the startup cycle? > > Regards, > Leen > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Blueprint and late servicesHi,
I look in the logs, and found out this: 2009/11/06 07:04:37 | INFO | jvm 1 | [pool-2-thread-1] DEBUG org.apache.geronimo.blueprint.container.AbstractServiceReferenceRecipe - Found initial references null for OSGi service (objectClass=com.my.Service) And this is a piece of the blueprint: <reference-list interface="com.my.Service" availability="optional"> <reference-listener ref="myRef" bind-method="addService" unbind-method="removeService" /> </reference-list> Is it possible to specify that it is OK to have no services for a while, and just warn myRef when new ones arrive or go? Regards, Leen On Thu, Nov 5, 2009 at 8:28 PM, Guillaume Nodet <gnodet@...> wrote: > The service will be registered in the OSGi registry as soon as all its > mandatory dependencies are satisfied. > If you turn on logging (or event admin), you should see the events > fired for the blueprint bundle. One of those should be a GRACE_PERIOD > event and contain the missing references. > > On Thu, Nov 5, 2009 at 20:17, Leen Toelen <toelen@...> wrote: > > Hi, > > > > I have two bundles, where one bundle exports a service using blueprint. > The > > second bundle export services through a managed service factory and felix > > fileinstall configuration files. These load some seconds after the start > of > > the application, as I would expect. > > > > The first service never gets exported though, because the blueprint > > reference to the other service. When I don't make a reference to he other > > service, the first service gets created. I tried using these methods to > > reference the other service: > > > > - <property name="**"><reference interface="*.*.*"/></property> > > - <reference interface="*.*.*"><registration-listener > ref="firstService"/> > > > > but to no avail. Even when I set the availablility to optional the first > > service is never started. Is there a way to specify a service reference > in > > blueprint to a service that gets created very late in the startup cycle? > > > > Regards, > > Leen > > > > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > ------------------------ > Open Source SOA > http://fusesource.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > |
| Free embeddable forum powered by Nabble | Forum Help |