Friday, September 26, 2008

Installing a new component in WSO2 Data Services using Equinox OSGi console

WSO2 Data services uses Equinox OSGi implementation. It allows us to easily install a new OSGi bundles in to WSO2 Data services through it's OSGi console. OSGi console of WSO2 Data services, is disabled by default. To enable OSGi console, you need to modify the file
/path/to/wso2-dataservices-1.0/webapps/ROOT/WEB-INF/web.xml
by uncommenting these lines

<init-param>
<param-name>commandline</param-name>
<param-value>-console 19444</param-value>
</init-param>


Now if you start data services, you will be able to connect to the OSGi console via telnet








Following are the most common Equinox OGSi commands.
  • install - Installs the bundle from the given URL
  • start - Starts the bundle with the given numeric or symbolic id
  • stop - Stops the bundle with the given numeric or symbolic id
  • ss - Reports a summary status of all installed bundles
  • diag - Reports any resolution problems for the bundle with the given numeric or symbolic id
So if you have a new component to be installed, you can simply install it using the install command.







Now if you look at the the status of the installed bundles, you can see the newly installed component it is not yet started (status is INSTALLED not ACTIVE)








Newly installed bundle can be started using the start command



and now if you check the status of the bundles again, you can see now the bundle is successfully started.

0 comments: