Bundle Management and Monitoring
This chapter describes how to manage and monitor the OSGi framework managed by JEUS OSGi by using the console tool.
For detailed explanations of the commands used in the examples, refer to OSGi Commands in JEUS Reference Guide. |
1. Monitoring Bundles
The following is an example of checking the list of bundles installed in the OSGi framework by using the console tool.
[MASTER]domain1.adminServer>show-osgi-framework-info -server server1 -framework framework-0 -lb OSGi Framework [framework-0] Information in the server[framework-0] Framework [framework-0] Overview ====================================================================== +----------------------------------------------------------+---------+ | System Bundle Name | Version | +----------------------------------------------------------+---------+ | org.apache.felix.framework | 5.4.0 | +----------------------------------------------------------+---------+ ====================================================================== Installed Bundles in the framework [framework-0]. ================================================================================ +----+-------------------+---------+--------------------+--------+-------------+ | Id | Symbolic Name | Version | Location | State | Start-level | +----+-------------------+---------+--------------------+--------+-------------+ | 0 | org.apache.felix. | 5.4.0 | System Bundle | ACTIVE | 0 | | |framework | | | | | +----+-------------------+---------+--------------------+--------+-------------+ | 2 | org.ops4j.pax.url | 1.3.7 | https://repo.maven | ACTIVE | 30 | | |.mvn | |.apache.org/maven2/ | | | | | | |org/ops4j/pax/url/p | | | | | | |ax-url-mvn/1.3.7/pa | | | | | | |x-url-mvn-1.3.7.jar | | | +----+-------------------+---------+--------------------+--------+-------------+ ================================================================================ [MASTER]domain1.adminServer>
2. Installing Bundles
The following is an example of installing bundles in the OSGi framework by using the console tool.
[MASTER]domain1.adminServer>install-bundle -location https://repo.maven.apache.org/maven2/org/ops4j/pax/url/pax-url-mvn/1.3.7/pax-url-mvn-1.3.7.jar -framework framework-0 -server server1 Installation completed successfully. [MASTER]domain1.adminServer>
3. Starting Bundles
The following is an example of starting bundles installed in the OSGi framework by using the console tool.
[MASTER]domain1.adminServer>start-bundle -name org.ops4j.pax.url.mvn -framework framework-0 -server server1 The bundle has been started successfully. [MASTER]domain1.adminServer>
4. Stopping Bundles
The following is an example of stopping bundles installed in the OSGi framework by using the console tool.
[MASTER]domain1.adminServer>stop-bundle -name org.ops4j.pax.url.mvn -framework framework-0 -server server1 The bundle has been stopped successfully. [MASTER]domain1.adminServer>
5. Updating Bundles
The following is an example of updating bundles installed in the OSGi framework by using the console tool.
[MASTER]domain1.adminServer>update-bundle -name org.ops4j.pax.url.mvn -framework framework-0 -server server1 The bundle has been updated successfully. [MASTER]domain1.adminServer>
6. Deleting Bundles
The following is an example of deleting bundles installed in the OSGi framework by using the console tool.
[MASTER]domain1.adminServer>uninstall-bundle -name org.ops4j.pax.url.mvn -framework framework-0 -server server1 The bundle has been uninstalled successfully. [MASTER]domain1.adminServer>