Hi XiLai,

Thank your for your answer! Just by declaring a default-property as you
mentioned it worked :)

Best regards


2014-04-04 10:13 GMT+02:00 XiLai Dai <[email protected]>:

>  Hi,
>
> Have you tried to add <cm:default-properties> into
> <cm:property-placeholder> ? for example,
>
>     <cm:property-placeholder persistent-id="*org.opennaas*"
> update-strategy="reload">
>         <cm:default-properties>
>             <cm:property name="abc" value="......"/>
>             <cm:property name="efg" value="......."/>
>         </cm:default-properties>
>     </cm:property-placeholder>
>
> Regards.
> Xilai
>  ------------------------------
> *发件人:* Adrián Roselló Rey [[email protected]]
> *发送时间:* 2014年4月1日 22:33
> *到:* [email protected]
> *主题:* services published and unpublished in karaf 3.0.0
>
>   Hi all!
>
>  I'm upgrading my software, which was deployed in top of Karaf 2.2.11, to
> Karaf 3.0.0 version. I'm almost finished with the upgrade, but I'm having
> some strange problems when starting specific bundles.
>
>  I publish my OSGI services via blueprint. I also use dOSGI to expose my
> services through WS like this:
>
>
>
>
>
>
>
>
>
>
>
>
>
> *<bean id="vcpeNetworkManager"
> class="org.opennaas.extensions.vcpe.manager.VCPENetworkManager"
> destroy-method="destroy"/> <service ref="vcpeNetworkManager"
> interface="org.opennaas.extensions.vcpe.manager.IVCPENetworkManager">
>     <service-properties>             <!-- Rest -->                <entry
> key="service.exported.interfaces" value="*"/>             <entry
> key="service.exported.configs" value="org.apache.cxf.rs
> <http://org.apache.cxf.rs>"/>             <entry
> key="service.exported.intents" value="HTTP"/>             <entry
> key="org.apache.cxf.rs.httpservice.context"
> value="${ws.rest.url}/vcpenetwork"/>             <entry
> key="org.apache.cxf.rs.address" value="/"/>             <entry
> key="org.apache.cxf.httpservice.requirefilter" value="true"/>
>     </service-properties> </service>*
>
>  In order to get the value of the ${ws.rest.url} property, I added the
> property-placeholder feature provided by blueprint-cm:
>
> *<cm:property-placeholder persistent-id="org.opennaas"
> update-strategy="reload" />*
>
>
>  It works perfectly, but when I install this bundle (and all of them
> declaring this placeholder) the services declared in the blueprint are
> published are unpublished rrepeatedly for a while. For example, here you
> can find  an extract of my log file:
>
>
> 16:26:16,246 INFO  | xtender: 3 | .manager.*VCPENetworkManager* |
> Starting VCPENetworkManager
> 16:26:16,256 INFO  | hread-3624 | .manager.*VCPENetworkManager* |
> Stopping VCPENetworkManager
> 16:26:16,279 INFO  | xtender: 1 | .manager.*VCPENetworkManager* |
> Starting VCPENetworkManager
> 16:26:16,290 INFO  | hread-3626 | .manager.*VCPENetworkManager* |
> Stopping VCPENetworkManager
> 16:26:16,306 INFO  | xtender: 2 | .manager.*VCPENetworkManager* |
> Starting VCPENetworkManager
> 16:26:16,316 INFO  | hread-3628 | .manager.*VCPENetworkManager* |
> Stopping VCPENetworkManager
> 16:26:16,335 INFO  | xtender: 3 | .manager.*VCPENetworkManager* |
> Starting VCPENetworkManager
> 16:26:16,342 INFO  | hread-3630 | .manager.*VCPENetworkManager* |
> Stopping VCPENetworkManager
> 16:26:16,378 INFO  | xtender: 1 | .manager.*VCPENetworkManager* |
> Starting VCPENetworkManager
> 16:26:16,396 INFO  | hread-3632 | .manager.*VCPENetworkManager* |
> Stopping VCPENetworkManager
>
>  I suggest it has something to do with blueprint-cm because I see this
> behaviour only in bundles with the property-placeholder declaration in
> blueprint.
>
>  Could it be possible? If not, any idea on what could be happening?
>
> Thanks!
>
>  --
>
>
> *Adrián Roselló Rey Distributed Applications and Networks Area (DANA)
> i2CAT Foundation, Barcelona, Spain*
>



-- 


*Adrián Roselló Rey Distributed Applications and Networks Area (DANA) i2CAT
Foundation, Barcelona, Spain*

Reply via email to