You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by thomasrynne <th...@gmail.com> on 2011/05/25 22:54:00 UTC

Disable automatic bundle restart?

Using peaberry, I have bundle A which exports a service and bundle B which
uses the service.

Using the vanilla felix installation I can restart bundle A and bundle B
then uses the new instance.
Under karaf, when I restart bundle A bundle B gets restarted too.

Is this a karaf feature? Is there a way to switch off this feature? I am new
to osgi so maybe there is a different way to do this.

Essentially I am trying to find the best way to redeploy new code without
disrupting the dependencies (with or without peaberry). Maybe services
should never keep a reference to another service and lookup the service on
every use?

Any pointers would be appreciated.

--
View this message in context: http://karaf.922171.n3.nabble.com/Disable-automatic-bundle-restart-tp2986102p2986102.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Disable automatic bundle restart?

Posted by thomasrynne <th...@gmail.com>.
Yes, I am using the deploy folder. Thanks, that explains it.
I googled for a fileinstall option to disable this feature but didn't find
anything.
At least I undersand it now.

thanks.

Btw, I am impressed by karaf it has made it much easier to learn osgi.
I only found it through a comment on stackoverflow when looking for an osgi
shell with autocomplete.

--
View this message in context: http://karaf.922171.n3.nabble.com/Disable-automatic-bundle-restart-tp2986102p2991946.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Disable automatic bundle restart?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Ah yeah, good point Guillaume ;)

Let see the Thomas' feedback.

Regards
JB

On 05/26/2011 10:56 AM, Guillaume Nodet wrote:
> How did you install the bundles ? Using the deploy folder ? If yes,
> fileinstall tries to start the bundles automatically iirc. If you want
> more control, use osgi:install / osgi:update to control your bundles.
>
>
> On Wednesday, May 25, 2011 at 10:54 PM, thomasrynne wrote:
>
>> Using peaberry, I have bundle A which exports a service and bundle B which
>> uses the service.
>>
>> Using the vanilla felix installation I can restart bundle A and bundle B
>> then uses the new instance.
>> Under karaf, when I restart bundle A bundle B gets restarted too.
>>
>> Is this a karaf feature? Is there a way to switch off this feature? I
>> am new
>> to osgi so maybe there is a different way to do this.
>>
>> Essentially I am trying to find the best way to redeploy new code without
>> disrupting the dependencies (with or without peaberry). Maybe services
>> should never keep a reference to another service and lookup the service on
>> every use?
>>
>> Any pointers would be appreciated.
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Disable-automatic-bundle-restart-tp2986102p2986102.html
>> Sent from the Karaf - User mailing list archive at Nabble.com
>> <http://Nabble.com>.
> ------------------------
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>

Re: Disable automatic bundle restart?

Posted by Guillaume Nodet <gn...@gmail.com>.
How did you install the bundles ? Using the deploy folder ? If yes, fileinstall tries to start the bundles automatically iirc. If you want more control, use osgi:install / osgi:update to control your bundles.



On Wednesday, May 25, 2011 at 10:54 PM, thomasrynne wrote:

> Using peaberry, I have bundle A which exports a service and bundle B which
> uses the service.
> 
> Using the vanilla felix installation I can restart bundle A and bundle B
> then uses the new instance.
> Under karaf, when I restart bundle A bundle B gets restarted too.
> 
> Is this a karaf feature? Is there a way to switch off this feature? I am new
> to osgi so maybe there is a different way to do this.
> 
> Essentially I am trying to find the best way to redeploy new code without
> disrupting the dependencies (with or without peaberry). Maybe services
> should never keep a reference to another service and lookup the service on
> every use?
> 
> Any pointers would be appreciated.
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Disable-automatic-bundle-restart-tp2986102p2986102.html
> Sent from the Karaf - User mailing list archive at Nabble.com (http://Nabble.com).
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com


Re: Disable automatic bundle restart?

Posted by thomasrynne <th...@gmail.com>.
I don't use an activator, the manifest has a Bundle-Module entry which a
peaberry bundle uses to do the registration.

The bundles aren't part of a feature.

thanks,
Thomas

--
View this message in context: http://karaf.922171.n3.nabble.com/Disable-automatic-bundle-restart-tp2986102p2987793.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Disable automatic bundle restart?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

do you use an Activator in your bundle or a blueprint descriptor ?
is your bundle part of a features ?

Thanks
Regards
JB

On 05/25/2011 10:54 PM, thomasrynne wrote:
> Using peaberry, I have bundle A which exports a service and bundle B which
> uses the service.
>
> Using the vanilla felix installation I can restart bundle A and bundle B
> then uses the new instance.
> Under karaf, when I restart bundle A bundle B gets restarted too.
>
> Is this a karaf feature? Is there a way to switch off this feature? I am new
> to osgi so maybe there is a different way to do this.
>
> Essentially I am trying to find the best way to redeploy new code without
> disrupting the dependencies (with or without peaberry). Maybe services
> should never keep a reference to another service and lookup the service on
> every use?
>
> Any pointers would be appreciated.
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Disable-automatic-bundle-restart-tp2986102p2986102.html
> Sent from the Karaf - User mailing list archive at Nabble.com.