You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Castor <yg...@gmail.com> on 2017/06/08 14:23:22 UTC

HotswapAgent and Karaf

Hello! 

Since i'm losing some time with redeploys ( Yes, bundle:watch helps a lot,
but my bundle takes quite sometime to clean/install everytime ) i'm trying
to find a faster way to develop. One of the options is to use a hot code
swapper like JRebel or DCEVM + HotSwap agent. 

It seems that HotSpot agent supports Equinox
http://hotswapagent.org/mydoc_plugin_osgiequinox.html , so i created a
equinox standalone bundle to test, and it works quite ok! So i changed the
karaf framework to Equinox and added the following config to karaf.bat, as
told in the guide. 

-XXaltjvm=dcevm -Dosgi.frameworkParentClassloader=app
-javaagent:C:\hotswap\hotswap-agent.jar

With that, it seems that Karaf itself starts with Hotswap Agent, but the
hotswap classloader is not propagated to the underlying bundles, it seems to
me that Karaf is initializing with HotSwap, but not the underlying Equinox,
how can i fix that?



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

Re: HotswapAgent and Karaf

Posted by Timothy Ward <ti...@paremus.com>.
Hi - have you tried using Bndtools? The support for running your code live in the IDE allows incremental build/redeploy which is a big productivity win.

Regards,

Tim

> On 8 Jun 2017, at 15:23, Castor <yg...@gmail.com> wrote:
> 
> Hello! 
> 
> Since i'm losing some time with redeploys ( Yes, bundle:watch helps a lot,
> but my bundle takes quite sometime to clean/install everytime ) i'm trying
> to find a faster way to develop. One of the options is to use a hot code
> swapper like JRebel or DCEVM + HotSwap agent. 
> 
> It seems that HotSpot agent supports Equinox
> http://hotswapagent.org/mydoc_plugin_osgiequinox.html , so i created a
> equinox standalone bundle to test, and it works quite ok! So i changed the
> karaf framework to Equinox and added the following config to karaf.bat, as
> told in the guide. 
> 
> -XXaltjvm=dcevm -Dosgi.frameworkParentClassloader=app
> -javaagent:C:\hotswap\hotswap-agent.jar
> 
> With that, it seems that Karaf itself starts with Hotswap Agent, but the
> hotswap classloader is not propagated to the underlying bundles, it seems to
> me that Karaf is initializing with HotSwap, but not the underlying Equinox,
> how can i fix that?
> 
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/HotswapAgent-and-Karaf-tp4050620.html
> Sent from the Karaf - User mailing list archive at Nabble.com.