Hi Dan, 1) well the default one is for std. Shutdown, this way you tell the service wrapper that if the system is going down for a shutdown no matter what the exit code says it does a reboot.
2) regarding your re-deployment. Consider this, every time a bundle is updated all previous Class definitions are ignored but since all Class definitions and Static members are stored in the PermGen space this memory is increased everytime you do a redeploy. This is allright if you just update a bundle or two but if you update lot's of bundles with lot's of class-definitions you run out of Memory here. There is one JVM that doesn't have a permGen space it's the JRockit, though I don't know if it is still available for free as it used to be :) One other side note, you might consider updating only the bundle in question instead of updating the complete set of bundles in a feature when going productive :) Regards, Achim 2011/12/16 Dan Tran <[email protected]> > Hi Achim > > 1. I am not really understand what wrapper.on_exit.default=RESTART > does, but with wrapper.on_exit.99=RESTART, and If can get my bundle to > shutdown karaf with exit code 99. That would be test. > > 2. Our usage of karaf is having a feature ( with a bunch of bundles > it has many classes 200+ and growing ). We remotely access karaf via > JMX to update our feature feature by having karaf to contact maven > repo to pickup the update. > How often do we do the update? quite often during development. > But not expect a lots once it get to customer size. This is how we > deliver bug fix and added feature. > > Thanks > > -Dan > > > > On Thu, Dec 15, 2011 at 2:37 PM, Achim Nierbeck <[email protected]> > wrote: > > Hi Dan, > > > > well the first entry on your link allready does what you need :) > > Instead of > > > > wrapper.on_exit.default=SHUTDOWN > > > > > > do a > > > > wrapper.on_exit.default=RESTART > > > > > > this way your karaf will always restart through the servicewrapper. > > > > No back to your PermGen leak issue. > > Could you give me a hint of what you actually are doing. > > If I did understand correctly you use the features service to deploy a > bunch > > of bundles. > > Now how often do you actually re-deploy this feature set? > > How many classes are contained in your bundles? > > > > regards, Achim > > > > > > > > Am 15.12.2011 21:23, schrieb Dan Tran: > > > >> We should be able to configure wrapper to restart karaf if karaf exits > >> with an expected code. see > >> http://wrapper.tanukisoftware.com/doc/english/prop-on-exit-n.html > >> > >> The question here is how can we do that a karaf's bundle? Can we call > >> shutdown with an exit code? > >> > >> Thanks > >> > >> -Dan > >> > >> > >> On Thu, Dec 15, 2011 at 9:21 AM, Jean-Baptiste Onofré<[email protected]> > >> wrote: > >>> > >>> Thanks for the update Karaf. > >>> > >>> For the wrapper, you can use respawn (on Unix). > >>> For the perm, it looks like a framework "issue" (we have to dig > around). > >>> > >>> Regards > >>> JB > >>> > >>> > >>> On 12/15/2011 06:18 PM, Dan Tran wrote: > >>>> > >>>> Here are notes after playing with dev:restart: > >>>> > >>>> 1. Permgen still leaks > >>>> > >>>> 2. Works only in main karaf shell ( ie invoke bin/karaf ). When I > >>>> ran it as a service via wrapper and use bin/client to assess karaf > >>>> shell, dev:restart kill my karaf. > >>>> > >>>> So it seems we need a cold restart. > >>>> > >>>> -D > >>>> > >>>> On Thu, Dec 15, 2011 at 9:02 AM, Dan Tran<[email protected]> > wrote: > >>>>> > >>>>> I am using 2.2.x, can I invoke dev:restart in my own bundle? any side > >>>>> affect on this since my bundle also get restart. > >>>>> > >>>>> Thanks > >>>>> > >>>>> -D > >>>>> > >>>>> On Thu, Dec 15, 2011 at 8:48 AM, Jean-Baptiste Onofré< > [email protected]> > >>>>> wrote: > >>>>>> > >>>>>> It's already possible: > >>>>>> > >>>>>> - in the console: dev:restart for 2.2.x version, system:restart for > >>>>>> trunk > >>>>>> (3.0) > >>>>>> - for the MBean, it's in org.apache.karaf:type=dev in Karaf 2.2.x > >>>>>> (restart() > >>>>>> operation), or org.apache.karaf:type=system in Karaf 3.0.0 (trunk, > >>>>>> restart() > >>>>>> operation) > >>>>>> > >>>>>> Regards > >>>>>> JB > >>>>>> > >>>>>> > >>>>>> On 12/15/2011 05:39 PM, Dan Tran wrote: > >>>>>>> > >>>>>>> > >>>>>>> Looks like the permgen issue is here for a long time. How about > >>>>>>> adding ability for karaf to restart itself ( Hudson, and eclipse > can > >>>>>>> do this i think ). May be via webconsole, or JMX > >>>>>>> > >>>>>>> Eager to hear how we could implement such feature for karaf. > >>>>>>> > >>>>>>> -D > >>>>>>> > >>>>>>> ---------- Forwarded message ---------- > >>>>>>> From: Dan Tran<[email protected]> > >>>>>>> Date: Thu, Dec 15, 2011 at 12:23 AM > >>>>>>> Subject: Re: Infamous permgen leak > >>>>>>> To: [email protected] > >>>>>>> > >>>>>>> > >>>>>>> It is about feature to be loaded in and out of karaf dynamically. > So > >>>>>>> I guess is a known issue to 'java', karaf is not an exception :( > >>>>>>> > >>>>>>> Wonder if ACE can solve this issue > >>>>>>> > >>>>>>> > >>>>>>> -D > >>>>>>> > >>>>>>> On Thu, Dec 15, 2011 at 12:15 AM, Jean-Baptiste > >>>>>>> Onofré<[email protected]> > >>>>>>> wrote: > >>>>>>>> > >>>>>>>> > >>>>>>>> Hi Dan, > >>>>>>>> > >>>>>>>> just to understand your issues: > >>>>>>>> - if you talk about the feature service itself, I'm agree that it > >>>>>>>> shouldn't > >>>>>>>> consume perm > >>>>>>>> - but the loaded classes (loaded by the feature service) consumes > >>>>>>>> perm, > >>>>>>>> and > >>>>>>>> it's a normal behavior (it's exactly the same with on Tomcat with > >>>>>>>> hot-deployment for instance) > >>>>>>>> > >>>>>>>> > >>>>>>>> Regards > >>>>>>>> JB > >>>>>>>> > >>>>>>>> On 12/15/2011 08:36 AM, Dan Tran wrote: > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Hello Karaf Team > >>>>>>>>> > >>>>>>>>> Each time I reinstall/update a feature at runtime, my karaf loses > >>>>>>>>> some > >>>>>>>>> permgen. Amount depending on number to classes I have. Is there > >>>>>>>>> any > >>>>>>>>> one able to address this issue? > >>>>>>>>> > >>>>>>>>> Setting JVM to -XX:+CMSPermGenSweepingEnabled > >>>>>>>>> -XX:+CMSClassUnloadingEnabled doesnot help. > >>>>>>>>> > >>>>>>>>> -Dan > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> -- > >>>>>>>> Jean-Baptiste Onofré > >>>>>>>> [email protected] > >>>>>>>> http://blog.nanthrax.net > >>>>>>>> Talend - http://www.talend.com > >>>>>> > >>>>>> > >>>>>> > >>>>>> -- > >>>>>> Jean-Baptiste Onofré > >>>>>> [email protected] > >>>>>> http://blog.nanthrax.net > >>>>>> Talend - http://www.talend.com > >>> > >>> > >>> -- > >>> Jean-Baptiste Onofré > >>> [email protected] > >>> http://blog.nanthrax.net > >>> Talend - http://www.talend.com > > > > > > > > -- > > -- > > *Achim Nierbeck* > > > > > > 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/> > > > -- 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/>
