You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by asookazian2 <as...@gmail.com> on 2015/02/13 20:15:10 UTC

bundle:update

Hi with karaf 3.0.2.

assume we have bundleA (a REST API) which uses bundleB (a DAO API).  I have
new versions of these bundles from a maven build.  I bundle:update B then
bundle:update A.  Cmd is update <bundleid> file:/path/to/bundle.

Do I need to also subsequently issue bundle:refresh and/or bundle:resolve
and/or bundle:restart to effect the "loading/use" of the new versions of
these bundles?

How do you know which version of a particular bundle is in use by karaf?  Is
there a way to check this in the console?



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

Re: bundle:update

Posted by Achim Nierbeck <bc...@googlemail.com>.
This solely depends on your use-case. If you have bundles that import other
bundles and don't depend on services make sure your dependent bundles do
get a refresh.
Just a simple example. If you have camel routes in your bundles, you need
to do a bundle:refresh [camel-core-bundle-id] so that the camel-core bundle
is able to pick up your changed route.

regards, Achim


2015-02-26 23:05 GMT+01:00 asookazian2 <as...@gmail.com>:

> ok what about refresh, restart, resolve after update?  are those
> recommended/required?
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/bundle-update-tp4038534p4038716.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: bundle:update

Posted by Ryan Moquin <fr...@gmail.com>.
I'm not sure how that would help with the refresh issue, or am I missing
something?  :)
On Apr 5, 2015 10:23 AM, "Charlie Mordant" <cm...@gmail.com> wrote:

> Hi,
> You can reference your services with service listeners (bind and unbind)
> to overcome this issue. Doing this, you won't encounter that issue
>
> Regards,
>
> 2015-04-05 0:33 GMT+02:00 Ryan Moquin <fr...@gmail.com>:
>
>> Out of curiosity, sometimes if I do a global refresh with Karaf 3.0.3, it
>> will appear to reload everything, even the ssh bundle.  When that happens
>> sometime the Karaf features bundle will fail to refresh which causes other
>> Karaf bundles to be shutdown.  I'm not sure what causes this (it seems like
>> using the Karaf shutdown shutdown command to clean the data directory or
>> the bundle cache seems to cause a similar problem).  Are there any known
>> issues that would cause this?  If not, I'll see if I can find a
>> reproducible example of this.  Unfortunately, I seem to run into a lot of
>> trouble with shutdown and the restart option.  I guess I want to make sure
>> there isn't anything known, otherwise I'll see if I can come up with some
>> examples.
>>
>> Ryan
>>
>> On Fri, Feb 27, 2015 at 12:10 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>>
>>> Global refresh could be a good advice to re-wire the packages.
>>>
>>>
>>> On 02/26/2015 11:05 PM, asookazian2 wrote:
>>>
>>>> ok what about refresh, restart, resolve after update?  are those
>>>> recommended/required?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.
>>>> com/bundle-update-tp4038534p4038716.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>
>>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>>
>
>
> --
> Charlie Mordant
>
> Full OSGI/EE stack made with Karaf:
> https://github.com/OsgiliathEnterprise/net.osgiliath.parent
>

Re: bundle:update

Posted by Charlie Mordant <cm...@gmail.com>.
Hi,
You can reference your services with service listeners (bind and unbind) to
overcome this issue. Doing this, you won't encounter that issue

Regards,

2015-04-05 0:33 GMT+02:00 Ryan Moquin <fr...@gmail.com>:

> Out of curiosity, sometimes if I do a global refresh with Karaf 3.0.3, it
> will appear to reload everything, even the ssh bundle.  When that happens
> sometime the Karaf features bundle will fail to refresh which causes other
> Karaf bundles to be shutdown.  I'm not sure what causes this (it seems like
> using the Karaf shutdown shutdown command to clean the data directory or
> the bundle cache seems to cause a similar problem).  Are there any known
> issues that would cause this?  If not, I'll see if I can find a
> reproducible example of this.  Unfortunately, I seem to run into a lot of
> trouble with shutdown and the restart option.  I guess I want to make sure
> there isn't anything known, otherwise I'll see if I can come up with some
> examples.
>
> Ryan
>
> On Fri, Feb 27, 2015 at 12:10 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> Global refresh could be a good advice to re-wire the packages.
>>
>>
>> On 02/26/2015 11:05 PM, asookazian2 wrote:
>>
>>> ok what about refresh, restart, resolve after update?  are those
>>> recommended/required?
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.
>>> com/bundle-update-tp4038534p4038716.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>


-- 
Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent

Re: bundle:update

Posted by Ryan Moquin <fr...@gmail.com>.
Out of curiosity, sometimes if I do a global refresh with Karaf 3.0.3, it
will appear to reload everything, even the ssh bundle.  When that happens
sometime the Karaf features bundle will fail to refresh which causes other
Karaf bundles to be shutdown.  I'm not sure what causes this (it seems like
using the Karaf shutdown shutdown command to clean the data directory or
the bundle cache seems to cause a similar problem).  Are there any known
issues that would cause this?  If not, I'll see if I can find a
reproducible example of this.  Unfortunately, I seem to run into a lot of
trouble with shutdown and the restart option.  I guess I want to make sure
there isn't anything known, otherwise I'll see if I can come up with some
examples.

Ryan

On Fri, Feb 27, 2015 at 12:10 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Global refresh could be a good advice to re-wire the packages.
>
>
> On 02/26/2015 11:05 PM, asookazian2 wrote:
>
>> ok what about refresh, restart, resolve after update?  are those
>> recommended/required?
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.
>> com/bundle-update-tp4038534p4038716.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: bundle:update

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Global refresh could be a good advice to re-wire the packages.

On 02/26/2015 11:05 PM, asookazian2 wrote:
> ok what about refresh, restart, resolve after update?  are those
> recommended/required?
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/bundle-update-tp4038534p4038716.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: bundle:update

Posted by asookazian2 <as...@gmail.com>.
ok what about refresh, restart, resolve after update?  are those
recommended/required?



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

Re: bundle:update

Posted by Achim Nierbeck <bc...@googlemail.com>.
No, there is nothing that will tell you.
And this is nothing Karaf specific.
Per OSGi spec (and the underlying felix or equinox framework),
if you update a bundle while another bundle still holds references to the
original bundle, those
references will stay until you do a new resolve. This is for
Package-Imports only, services are usually stopped and started again.

regards, Achim

2015-02-13 20:15 GMT+01:00 asookazian2 <as...@gmail.com>:

> Hi with karaf 3.0.2.
>
> assume we have bundleA (a REST API) which uses bundleB (a DAO API).  I have
> new versions of these bundles from a maven build.  I bundle:update B then
> bundle:update A.  Cmd is update <bundleid> file:/path/to/bundle.
>
> Do I need to also subsequently issue bundle:refresh and/or bundle:resolve
> and/or bundle:restart to effect the "loading/use" of the new versions of
> these bundles?
>
> How do you know which version of a particular bundle is in use by karaf?
> Is
> there a way to check this in the console?
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/bundle-update-tp4038534.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master