String jar = request.getParameter( "jar" );
String bundleId = request.getParameter( "bundleId" );
//First uninstall the bundle
Bundle bundle;
try {
try {
bundle = OSGIUtil.getInstance().getBundleContext().getBundle( new Long( bundleId ) );
} catch ( NumberFormatException e ) {
bundle = OSGIUtil.getInstance().getBundleContext().getBundle( bundleId );
}
bundle.uninstall();
} catch ( BundleException e ) {
Logger.error( OSGIAJAX.class, "Unable to undeploy bundle [" + e.getMessage() + "]", e );
}
//Then move the bundle from the load folder to the undeployed folder