Network Deployment (Distributed operating systems), v8.0 > Administer applications and their environment > Administer OSGi applications > Administer bundle repositories > Administer bundles in the internal bundle repository
Administer bundles in the internal bundle repository using wsadmin commands
Use wsadmin commands to list, add, remove, or show further details for bundles and composite bundles that are held in the bundle repository that is included in the product.
Before you begin
We can administer bundles and composite bundles in the internal bundle repository by using wsadmin as described in this topic, or by using the administrative console as described in Administer bundles in the internal bundle repository.
About this task
WAS includes an internal bundle repository, in which you can store the bundles and composite bundles for your OSGi applications.
If your OSGi applications are configured to expect to find certain bundles in the internal bundle repository, add those bundles to the repository. Composite bundles can either be included directly in the applications, or provisioned from the internal bundle repository or from an external repository that can process composite bundles. If your bundle includes Blueprint XML files that specify service or reference elements, and the bundle is included in a EBA asset or installed in the internal bundle repository, then these elements are respected during provisioning and appropriate services are provisioned when needed. See Provisioning for OSGi applications.
We can install bundles singly, or you can install a set of bundles packaged as a compressed archive file with a .zip file extension. In both cases, the bundles are available individually in the repository. If you install a composite bundle in a bundle repository, and the composite bundle includes bundles by reference, ensure that the referenced bundles are also available in the same repository. If you use the internal bundle repository, and the composite bundle directly contains bundles, the contained bundles are not listed separately and are only available as part of the composite bundle. For more information, see Composite bundles.
We can list, add, remove, or show further details for bundles and composite bundles that are held in the internal bundle repository.
Procedure
- List all bundles and composite bundles that are held in the internal bundle repository.
Use the listLocalRepositoryBundles command. For example:
AdminTask.listLocalRepositoryBundles()For more information, see listLocalRepositoryBundles command.
Notes:
- The list includes any bundles that we have added since you last saved your changes, and excludes any bundles that we have removed since you last saved your changes.
- The output from this command is formatted so that you can copy the list of bundles, then paste them into the removeLocalRepositoryBundles command.
- Add a bundle, composite bundle or grouped-up set of bundles to the internal bundle repository.
Use the addLocalRepositoryBundle command. For example:
AdminTask.addLocalRepositoryBundle('-file path')Each individual bundle must be packaged as a .jar file, and must contain a suitably-configured bundle manifest file. Each composite bundle must be packaged as a compressed archive file with a .cba file extension, and must contain a suitably-configured composite bundle manifest file. Each grouped-up set of bundles must be packaged as a compressed archive file with a .zip file extension.For more information, see addLocalRepositoryBundle command.
- Remove one or more bundles or composite bundles from the internal bundle repository.
Use the removeLocalRepositoryBundle or removeLocalRepositoryBundles command. For example:
AdminTask.removeLocalRepositoryBundle('-symbolicName bundle_symbolic_name -version bundle_version')AdminTask.removeLocalRepositoryBundles([ 'bundle1_symbolic_name;bundle1_version bundle2_symbolic_name;bundle2_version bundle3_symbolic_name;bundle3_version ' ])Notes:
- The output from the listLocalRepositoryBundles command is formatted so that you can copy the list of bundles, then paste them into the removeLocalRepositoryBundles command.
- We cannot remove composite bundles at the same time as you remove any bundles that they reference. We must first remove the composite bundles, then run the removeLocalRepositoryBundles command a second time to remove the referenced bundles.
See removeLocalRepositoryBundle command and removeLocalRepositoryBundles command.
- Show further details (for example, imported packages, exported packages, and required bundles) for a bundle or composite bundle in the internal bundle repository.
Use the showLocalRepositoryBundle command. For example:
AdminTask.showLocalRepositoryBundle('-symbolicName bundle_symbolic_name -version bundle_version')For more information, see showLocalRepositoryBundle command.
What to do next
- If you added or removed a bundle or composite bundle, save changes to the master configuration.
- If you updated a bundle or composite bundle, and to update an asset that uses it, see Update bundle versions for an EBA asset using the editAsset command.
- If you added or updated a bundle or composite bundle, and to install an enterprise OSGi application that uses it, see Deploy an OSGi application as a business-level application.
- If you added or updated a composite bundle, and to use it to extend a composition unit, see Add or removing extensions for an OSGi composition unit using wsadmin. .
Subtopics
- listLocalRepositoryBundles command
Use the listLocalRepositoryBundles command to list all bundles held in the bundle repository that is included in the product.- addLocalRepositoryBundle command
Use the addLocalRepositoryBundle command to add a bundle, composite bundle or grouped-up set of bundles to the internal bundle repository that is included in the product.- removeLocalRepositoryBundle command
Use the removeLocalRepositoryBundle command to remove a bundle or composite bundle from the bundle repository that is included in the product.- removeLocalRepositoryBundles command
Use the removeLocalRepositoryBundles command to remove bundles and composite bundles from the bundle repository that is included in the product.- showLocalRepositoryBundle command
Use the showLocalRepositoryBundle command to show further details (in particular all manifest header entries) for a bundle in the bundle repository that is included in the product.
Parent topic: Administer bundles in the internal bundle repository
Related concepts:
About OSGi ApplicationsRelated tasks:
Secure OSGi ApplicationsRelated reference:
OSGi Applications: Troubleshooting tips
listLocalRepositoryBundles command
removeLocalRepositoryBundle command
removeLocalRepositoryBundles command
addLocalRepositoryBundle command
showLocalRepositoryBundle commandRelated information:
Internal bundle repository [Collection]
Internal bundle repository [Settings]
Upload bundle [Settings]
Task topic Feedback
Copyright IBM Corporation 2009, 2011. All Rights Reserved.
This information center is powered by Eclipse technology.