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!

From console:

  1. find 'bundle-name' //display bundles , obtain the id came from here.
  2. stop 'id'

From code:

  1. First obtain the bundle object using PackageAdmin.getBundles(title)
  2. 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);