I must understand how to stop a particular bundle within the Apache Felix Web Console running only java code.
For instance: I wish to have the ability to retrieve a lot of money, let us say by title, and prevent it.
Thanks ahead of time!
find 'bundle-name'//display bundles , obtain the id came from here.
- First obtain the bundle object using PackageAdmin.getBundles(title)
- Call Bundle.stop on that bundle.
EDIT: To find the PackageAdmin object:
ServiceReference ref = context.getServiceReference(PackageAdmin.class.getName()); PackageAdmin pa = (ref == null) ? null : (PackageAdmin) context.getService(ref);