You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Erhan Bagdemir <er...@gmail.com> on 2014/08/20 14:40:02 UTC

Hotswap Bundle classes

Hi Folks,

is it possible to swap the bundle classes at runtime in Karaf container ?
Are there any experiences with it ?

Erhan

Re: Hotswap Bundle classes

Posted by Erhan Bagdemir <er...@gmail.com>.
Using the debugger to use java hotswap vm was the first way that I head up.
But, I don't really have much experience with the Karaf's classloading
mechanism and its internals. It was not clear to me, if this way would
work and wanted to hear some advices. I am gonna have a look at
dev:watch * command. thanks for your advice.

2014-08-20 15:20 GMT+02:00 Achim Nierbeck <bc...@googlemail.com>:
> hmm, well if you're attached to the JVM process via a debugger, a "hotswap"
> is already possible ...
> am I missing a use-case here?
> besides, Karaf does have an awsome command for bundle:update triggers
> already ;)
> bundle:watch (or dev:watch - depends on the version)
> with that just build your bundle and it's updated instantly
>
> or just place your bundle as extracted Bundle in the deploy folder, that'll
> do almost as good, at least while debugging ;)
>
> regards,
> Achim
>
>
>
> 2014-08-20 15:16 GMT+02:00 Erhan Bagdemir <er...@gmail.com>:
>
>> Achim,
>> thank you very much for your reply and sorry for using the wrong mailing
>> list.
>> I am thinking of developing an Eclipse plugin to integrate Karaf
>> container with the IDE - just like EIK does and plan to swap the
>> classes (Hotswap) in background while editing the source code e.g. on
>> java editor's unfocus event, just like Intellij IDEA does, swapping
>> the classes on-fly on application servers like on Tomcat. We could
>> really save time while we're developing our project, since we didn't
>> have to package/install the bundle every time we have some changes and
>> did not need to reload the bundle, respectively.
>>
>> Regards
>>
>> 2014-08-20 14:46 GMT+02:00 Achim Nierbeck <bc...@googlemail.com>:
>> > Like bundle:update ???
>> > The only way of "swapping" is to update your bundle.
>> > Is this what you where looking for?
>> >
>> > regards, Achim
>> >
>> > P.S. the users mailing list is more appropriate for such questions
>> >
>> >
>> > 2014-08-20 14:40 GMT+02:00 Erhan Bagdemir <er...@gmail.com>:
>> >
>> >> Hi Folks,
>> >>
>> >> is it possible to swap the bundle classes at runtime in Karaf container
>> ?
>> >> Are there any experiences with it ?
>> >>
>> >> Erhan
>> >>
>> >
>> >
>> >
>> > --
>> >
>> > 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/>
>> >
>> > Software Architect / Project Manager / Scrum Master
>>
>
>
>
> --
>
> 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/>
>
> Software Architect / Project Manager / Scrum Master

Re: Hotswap Bundle classes

Posted by Achim Nierbeck <bc...@googlemail.com>.
hmm, well if you're attached to the JVM process via a debugger, a "hotswap"
is already possible ...
am I missing a use-case here?
besides, Karaf does have an awsome command for bundle:update triggers
already ;)
bundle:watch (or dev:watch - depends on the version)
with that just build your bundle and it's updated instantly

or just place your bundle as extracted Bundle in the deploy folder, that'll
do almost as good, at least while debugging ;)

regards,
Achim



2014-08-20 15:16 GMT+02:00 Erhan Bagdemir <er...@gmail.com>:

> Achim,
> thank you very much for your reply and sorry for using the wrong mailing
> list.
> I am thinking of developing an Eclipse plugin to integrate Karaf
> container with the IDE - just like EIK does and plan to swap the
> classes (Hotswap) in background while editing the source code e.g. on
> java editor's unfocus event, just like Intellij IDEA does, swapping
> the classes on-fly on application servers like on Tomcat. We could
> really save time while we're developing our project, since we didn't
> have to package/install the bundle every time we have some changes and
> did not need to reload the bundle, respectively.
>
> Regards
>
> 2014-08-20 14:46 GMT+02:00 Achim Nierbeck <bc...@googlemail.com>:
> > Like bundle:update ???
> > The only way of "swapping" is to update your bundle.
> > Is this what you where looking for?
> >
> > regards, Achim
> >
> > P.S. the users mailing list is more appropriate for such questions
> >
> >
> > 2014-08-20 14:40 GMT+02:00 Erhan Bagdemir <er...@gmail.com>:
> >
> >> Hi Folks,
> >>
> >> is it possible to swap the bundle classes at runtime in Karaf container
> ?
> >> Are there any experiences with it ?
> >>
> >> Erhan
> >>
> >
> >
> >
> > --
> >
> > 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/>
> >
> > Software Architect / Project Manager / Scrum Master
>



-- 

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

Software Architect / Project Manager / Scrum Master

Re: Hotswap Bundle classes

Posted by Erhan Bagdemir <er...@gmail.com>.
Achim,
thank you very much for your reply and sorry for using the wrong mailing list.
I am thinking of developing an Eclipse plugin to integrate Karaf
container with the IDE - just like EIK does and plan to swap the
classes (Hotswap) in background while editing the source code e.g. on
java editor's unfocus event, just like Intellij IDEA does, swapping
the classes on-fly on application servers like on Tomcat. We could
really save time while we're developing our project, since we didn't
have to package/install the bundle every time we have some changes and
did not need to reload the bundle, respectively.

Regards

2014-08-20 14:46 GMT+02:00 Achim Nierbeck <bc...@googlemail.com>:
> Like bundle:update ???
> The only way of "swapping" is to update your bundle.
> Is this what you where looking for?
>
> regards, Achim
>
> P.S. the users mailing list is more appropriate for such questions
>
>
> 2014-08-20 14:40 GMT+02:00 Erhan Bagdemir <er...@gmail.com>:
>
>> Hi Folks,
>>
>> is it possible to swap the bundle classes at runtime in Karaf container ?
>> Are there any experiences with it ?
>>
>> Erhan
>>
>
>
>
> --
>
> 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/>
>
> Software Architect / Project Manager / Scrum Master

Re: Hotswap Bundle classes

Posted by Achim Nierbeck <bc...@googlemail.com>.
Like bundle:update ???
The only way of "swapping" is to update your bundle.
Is this what you where looking for?

regards, Achim

P.S. the users mailing list is more appropriate for such questions


2014-08-20 14:40 GMT+02:00 Erhan Bagdemir <er...@gmail.com>:

> Hi Folks,
>
> is it possible to swap the bundle classes at runtime in Karaf container ?
> Are there any experiences with it ?
>
> Erhan
>



-- 

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

Software Architect / Project Manager / Scrum Master