|
Hello, I have use case that requires the ability to be able to
deactivate and or unregister bundles or individual extension points with out
shutting down the server. I have created an MBean for my service, but
what methods do I need to invoke to deactivate a particular extension /
component? Something like this:
/** * deactivate a particular component by name
*
*/
public void deactivate(String component) {
Component c = (Component)NXRuntime.getRuntime()
.getComponent(component);
try {
c.deactivate(NXRuntime.getRuntime().getContext());
} catch (Exception e) {
//TODO clean this up
e.printStackTrace();
}
}
/** * undeploy a specific bundle by name * */
public void undeploy(String bundle) {
RuntimeContext context = NXRuntime.getRuntime().getContext();
try {
context.undeploy(bundle);
} catch (Exception e) {
//TODO fix clean this up
e.printStackTrace();
}
} I think the above would work ok, but how about
extensions? How do I get a list of extensions for a given
component? I guess that I could have the component provide a helper
method of its extension points since it is aware of them as they are activated,
but I’m wondering if there already a method available that provides this?
Or is there a better way to approach this? Thanks in advance for you assistance. Regards, Todd |
_______________________________________________ ECM mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/ecm
