Working with WSO2 OSGI Console

WSO2 Carbon 4.3.0 was released December 2014 and is the latest version of the WSO2 Carbon Platform. The lean, complete, OSGi-based platform includes more than 175 OSGI carbon-osgiBundles or features that run on the Carbon platform. Since the Carbon servers are made completely out of OSGI bundles developers have the luxury to do various tasks with the OSGI bundles through the OSGI console provided through the WSO2 Carbon Servers. So, for this exercise we will be using the newly released WSO2 Carbon 4.3.0 Server. With this post will see ow working with WSO2 OSGI console can help developers. You can download it from wso2.com.

To Access the WSO2 OSGI Console goto ${CARBON_HOME}/bin and run;

./wso2server.sh -DosgiConsole

The server will start with the following;

$ ./wso2server.sh -DosgiConsole
JAVA_HOME environment variable is set to /home/nuwan/installation/java/jdk1.7.0_67
CARBON_HOME environment variable is set to /home/nuwan/products/carbon/wso2carbon-4.3.0
OSGi console has been enabled with options: -console

Furthermore, when the OSGI console is ready the following prompt will be visible (hit enter a couple of time if you dont).

osgi>

Now that the console is available we will see what we can accomplish. To get an idea of what kind of commands are available in the OSGI console;

osgi> help

With these commands you can accomplish most of the administration tasks on the carbon server. For the sake of explanation we will go through some sample OSGI commands available through the Carbon Server OSGI Console. 

View and list the admin service available in the Carbon Server;

osgi> listAdminServices

Get the installation history of OSGI bundles (Features) installation;

osgi> getInstallationHistory

List all features installed in the Carbon Server;

osgi> ls

So, as you can see WSO2 Carbon OSGI console can be used as a provisioning tools for developers and administrators alike. When using WSO2 products this can be a handy tool to get some administrative tasks done easily. I will come up with another blog on how you can accomplish some tedious yet necessary tasks through the OSGI console. Please do comment on the post if you have any problems.

One Reply to “Working with WSO2 OSGI Console”

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.