Interacting with the OSGi bundle cache

The bundle cache is a cell-wide store (or server-wide for single-server systems) of bundles that are referenced by OSGi applications, and that have been downloaded from both internal and external repositories. You can interact with the bundle cache using either the administrative console, or the methods of the OSGi BundleCacheManager MBean.

About this task

You can get an up-to-date list of the bundles in the bundle cache, check if all bundles have been successfully downloaded, and request that one or more bundles be downloaded again. For a given bundle you can view the bundle size, the download status, and a list of the assets and composition units that use the bundle. You can also view and refresh the repository URL for the repository that hosts the bundle.

The main differences between interacting with the OSGi bundle cache by using the administrative console and by using the MBean interface are as follows:
  • You can use the Bundle cache [Collection] panel to change the sort order in the table, and to filter by (for example) bundle name, or by bundle state.
  • You can use the MBean interface to remove a bundle from the cache.

The methods for the OSGi BundleCacheManager MBean interface are documented in the Additional Application Programming Interfaces (APIs) section of the generated API documentation.

You use the MBean methods with the AdminControl object of the wsadmin scripting client. For example:
objNameString = AdminControl.completeObjectName('WebSphere:type=BundleCacheManager,*')
print AdminControl.invoke(objNameString, 'areAllDownloadsComplete') 
For more information about using MBean methods with the AdminControl object, see the "invoke" and "invoke_jmx" sections of Commands for the AdminControl object using wsadmin scripting.

Some common tasks for which you might interact with the bundle cache are as follows:

Procedure


Task topic

Terms of use | Feedback


Timestamp icon Last updated: Tuesday, 20 September 2011
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-base-dist&topic=ta_admin_bundlecachemanager

Copyright IBM Corporation 2009, 2011. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)