Stop of activator or destroy on the blueprint bean. Regards JB
Sent from my Samsung Galaxy smartphone. -------- Original message -------- From: Prithviraj <[email protected]> Date:28/01/2015 07:42 (GMT+01:00) To: [email protected] Cc: Subject: Re: Need to execute code while uninstalling application on Karaf Thanks a lot Christian. I am looking into this solution . For now we need some quick fix . can you please let me know if there is any hook which can be plug at stopping of bundle (pre stop ) ? Thanks in advance . On Tue, Jan 27, 2015 at 7:13 PM, cschneider [via Karaf] < [email protected]> wrote: > Almost all karaf modules use this. > > As an example look at this: > > https://git-wip-us.apache.org/repos/asf?p=karaf.git;a=blob;f=bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/osgi/Activator.java;h=c5c765b18d006a4053a0a66c5d02600259ab94dd;hb=HEAD > > I have condensed the code a bit: > BundlesMBeanImpl bundlesMBeanImpl = new BundlesMBeanImpl(bundleContext, > bundleService); > Hashtable<String, Object> props = new Hashtable<>(); > props.put("jmx.objectname", "org.apache.karaf:type=bundle,name=" + > System.getProperty("karaf.name")); > bundleContext.registerService(getInterfaceNames(mbean), mbean, props); > > Also see: > http://aries.apache.org/modules/jmx.html > > Christian > > On 27.01.2015 13:32, Prithviraj wrote: > > Do we have any sample example of it , which i can follow ? > > > > > > > > > > -- > > View this message in context: > http://karaf.922171.n3.nabble.com/Need-to-execute-code-while-uninstalling-application-on-Karaf-tp4038037p4038045.html > > Sent from the Karaf - Dev mailing list archive at Nabble.com. > > > -- > Christian Schneider > http://www.liquid-reality.de > > Open Source Architect > http://www.talend.com > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://karaf.922171.n3.nabble.com/Need-to-execute-code-while-uninstalling-application-on-Karaf-tp4038037p4038046.html > To unsubscribe from Need to execute code while uninstalling application > on Karaf, click here > <http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4038037&code=bWVldHJhajE0QGdtYWlsLmNvbXw0MDM4MDM3fC0yMDU1MjgzMDg0> > . > NAML > <http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://karaf.922171.n3.nabble.com/Re-Need-to-execute-code-while-uninstalling-application-on-Karaf-tp4038059.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
