Online Books:
java.net on MarkMail:
Search |
||||||
TOTD #34: Using Felix Shell with GlassFishPosted by arungupta on June 20, 2008 at 5:54 PM PDT
TOTD
#33 explains how to create a GlassFish v3
distribution that uses Apache Felix
(default) as the OSGi R4 Service
Platform runtime. This blog explains how to use Felix
Shell
TUI with that bundle to issue commands to the OSGi framework
and obtain information from it.
To enable Felix Shell with GlassFish v3, add the lines ...
to "felix.auto.start.1" property in "felix/conf/config.properties" file of the expanded bundle. The updated property looks like:
with the changes highlighted in bold. The shell works only if GlassFish is started using "java -jar modules/glassfish-10.0-SNAPSHOT.jar" command. The shell is available when the following prompt is shown:
You can type "help" in the shell to see the complete list of commands that are available:
This shows the list of available commands along with a brief description. For example "ps" shows the list of installed bundles as shown below:
More details about the commands and options are available @ Felix Usage Docs. The commands are described in "felix/conf/config.properties" (around line 38). Please leave suggestions on other TOTD (Tip Of The Day) that you'd like to see. A complete archive is available here. Technorati: totd glassfish v3 felix osgi »
Related Topics >>
Glassfish Comments
Comments are listed in date ascending order (oldest first)
Submitted by rimartin7 on Tue, 2008-07-29 12:44.
Hi Arun,
This worked very nicely for me. Now as you know we developers get momentary highs (from our work) and then go back to grubbing on next issues. The next TOTD that would be helpful for me is how and where to build the updatetool and the pkg etc. that came with gfv3 tp2. To use the snap shot I need to install the ejb and metro componentry etc.
Submitted by arungupta on Wed, 2008-07-30 09:19.
rimartin7, do you want to build the tool or use it ? You can invoke glassfishv3-tp2/bin/updatetool script to invoke the tool.
Submitted by rimartin7 on Thu, 2008-07-31 11:17.
After building gf v3 (out of svn checkout as your #33 describes) I get a SNAPSHOT. There is no update tool in the SNAPSHOT/bin folder and there are no folders parallel to bin for updatetool and pkg as there are in glassfishv3-tp2.
glassfishv3-tp2 on Windows would not launch the felix console, gui or otherwise. So I svn'ed and built the SNAPSHOT. It runs nicely from "java -jar modules/glassfish-10.0-SNAPSHOT.jar" command and the felix gui works. But no updatetool found.
Submitted by snjezana on Tue, 2008-08-05 10:58.
At this point, updatetool integration is done in packager module which is built as separate build target by release engineering. Main reason for this is that integration involves creation of IPS packages which in its turn requires running IPS package repository server, so it is quite heavy weight and not something most GF developers will do.
We are currently working on the new implementation of packager which will enable developers to create zip based distribution with the same file layout as the "official" distribution and it will also include basic aspects of updatetool integration. While this is tricky to implement, you should end up being able to install ejb, metro and other additional UC components in the distribution that you built yourself although you will probably not be able to upgrade any of base GlassFish packages.
HTH...
|
||||||
|
|