Hi again!

Bad news, seems like it did not work for all bundles, but for the most of
them :(
Debugging a bit more and analyzing deeper the logs, we identified when the
services of my Bundle were stopped and starting. Just when the bundle
change to CREATED state, a new thread starts to destroy all its services
(Thread-58 in the log file)






*12:43:13,399 DEBUG | StartLevel | ntainer.BlueprintEventDispatcher |
Sending blueprint container event BlueprintEvent[type=CREATED] for bundle
org.opennaas.extensions.vcpe12:43:13,401 DEBUG | patcher: 1 |
raf.shell.osgi.BlueprintListener | Blueprint app state changed to Created
for bundle 188 12:43:13,401 DEBUG | StartLevel |
container.BlueprintContainerImpl | Running blueprint container for bundle
org.opennaas.extensions.vcpe in state Created12:43:13,406 DEBUG |
Thread-58 | lueprint.container.ServiceRecipe | Unregistering service
.component-4 12:43:13,406 DEBUG |  Thread-58 |
lueprint.container.ServiceRecipe | Calling listeners for service
unregistration12:43:13,407 DEBUG |  Thread-58 |
r.AbstractServiceReferenceRecipe | Untracking reference
[org.opennaas.core.resources.capability.ICapabilityFactory] for OSGi
service
(objectClass=org.opennaas.core.resources.capability.ICapabilityFactory)*


etc.

All this services are published by the one called

*"org.opennaas.extensions.vcpe", which can be seen in the log.*
This situation happens randomly. Is there any reason for this behaviour?

Thanks a lot,

Cheers,


2014-04-04 15:09 GMT+02:00 Adrián Roselló Rey <[email protected]>:

> 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*
>



-- 




* Adrián Roselló Rey Distributed Applications and Networks Area (DANA)
i2CAT Foundation, Barcelona, Spain*
T: +34 93 553 25 49
http://dana.i2cat.net

Reply via email to