While in rare cases it is needed to use OSGi commands to analyse problems occurring in a BusinessWorks application this article presents the most simple way to do that.
The approach is to use curl to send commands thru the available appnode OSGi http.
# How to find the appnode OSGi port number
You can find it in the appnode config.ini file, located in the folder <TIBCO_HOME>/bw/6.X/domains/<DOMAIN_NAME>/appnodes/<APPSPACE_NAME>/<APPNODE_NAME>
For example :
The osgi port number is defined by the org.osgi.service.http.port property
You can also find it using the bwadmin command with the following options:
bwadmin –d <DOMAIN_NAME> -a <APPSPACE_NAME> appnode <APPNODE_NAME>
The osgi port number is displayed in the MgmtPort field
# How to send an OSGi command using Curl
This can be done with the following command:
curl -v http://localhost:<PORT>/bw/framework.json/osgi?command=<COMMAND>
For example :
curl -v http://localhost:9585/bw/framework.json/osgi?command=la
Example of using curl to execute the ‘la’ command
You can use the command ‘help’ to get the list of all available commands.
The list of supported commands is also available, with additional explanations, in the BWCE documentation at the following URL:
https://docs.tibco.com/pub/bwce/2.9.1/doc/html/Default.htm#bwce-app-monitoring/osgi-commands.htm
# Useful to know
In a BusinessWorks Container Edition (BWCE) context this approach is the only one available, explanations on how to use Curl in a container environment are available in the BWCE documentation:
https://docs.tibco.com/pub/bwce/2.9.1/doc/html/Default.htm#bwce-app-monitoring/using-http-client-to.htm
- 1
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now