You and me seem to have similar problems. I posted the following on the
Aries user list:

http://www.mail-archive.com/[email protected]/msg01043.html

So far no one has responded which is a bit disappointing.

I also have problems with using the configured properties. But I also
couldn't get the service to be published. An instance of my class is
created but no service is published.

Did you get a service published?

/Bengt


2013/10/7 SvS <[email protected]>

> I use the following configuration in blueprint and I can create the service
> with the Apache Karaf Web Console Configuration. But how can I use the
> specified properties (initial and when updated)?
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0";
>   xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
>   http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
> http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd";>
>
>   <reference id="eventAdmin" interface="org.osgi.service.event.EventAdmin"
> />
>
>   <cm:managed-service-factory factory-pid="xxx.ServiceFactory">
>     <interfaces>
>       <value>xxx.Service</value>
>     </interfaces>
>
>     <cm:managed-component  class="xxx.ServiceImpl" init-method="start"
> destroy-method="stop">
>       <property name="eventAdmin" ref="eventAdmin" />
>     </cm:managed-component>
>   </cm:managed-service-factory>
> </blueprint>
>
> Also when I specify a ManagedServiceFactory. The ManagedServiceFactory is
> not invoked.
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0";
>   xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
>   http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
> http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd";>
>
>   <bean id="serviceFactory" class="xxx.ServiceFactory" init-method="start"
> destroy-method="stop">
>   </bean>
>
>   <service ref="serviceFactory"
> interface="org.osgi.service.cm.ManagedServiceFactory"/>
>
>   <reference id="eventAdmin" interface="org.osgi.service.event.EventAdmin"
> />
>
>   <cm:managed-service-factory ref="serviceFactory"
> factory-pid="xxx.ServiceFactory">
>     <interfaces>
>       <value>xxx.Service</value>
>     </interfaces>
>
>     <cm:managed-component  class="xxx.ServiceImpl" init-method="start"
> destroy-method="stop">
>       <property name="eventAdmin" ref="eventAdmin" />
>     </cm:managed-component>
>   </cm:managed-service-factory>
> </blueprint>
>
> What is wrong / missing?
>
> Thanks,
> Sam.
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-configure-managed-service-factory-with-blueprint-tp4029857.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Reply via email to