Gemini Management 2.0 has been out for some time and is spec compliant with the OSGi alliance Enterprise 5.0 JMX specification. The project is very much in maintenance mode pending changes to the specification or bugs. I am moving on to new things and while I’m very sad to be leaving behind the wonderful community at Eclipse, Gemini Management will be in good hands. Florian Waibel from Eclipse Source has taken over the leadership and is already getting stuck in to the code with some much needed updates to the build system. I’m still on the mailing lists and I do actually read them as well so I may well pop up in the future but for now I have new challenges to work on.
Category: OSGi
Anything about the OSGi Java modules system
-
New Web Admin Console In Virgo
Virgo 3.6.0.M01 has been released and it contains a new web admin console. While visually it appears very similar to the existing web console it has some new features and under the covers a lot has changed.
New Features
The OSGi explorer has been replaced with a graphical view that shows both the service and dependency relationships between bundles. Clicking on the relationships or the bundles brings up more detailed information. Double clicking lets you navigate round the bundles and explore their relationships.
The Configuration view is now more detailed showing the configuration present in each Region.
There’s a new view that shows the repositories configured in Virgo and lets you deploy Artefacts directly from those repositories.
Under the Hood
The Web Admin console now has very few dependencies and can run on either the OSGi HTTPService or as a Web Application Bundle without any changes. It will detect its environment and only deploy itself on a HTTPService if there is no Web Application Container available. It is heavily AJAX based and uses a combination of Gemini Management and Jolokia (a library that converts MBeans to JSON end points) to both read and modify the OSGi framework. The only bundles required in addition are the Equinox Regions implementation, two utility bundles from Apache to handle file uploads and, of course, OSGi itself.
The best things about these changes is that the Web Admin Console now comes packaged with the Virgo Kernel meaning you get web based admin without needing the full Tomcat or Jetty based packagings of Virgo.
The Web Admin Console will continue to be developed with more improvements planned.
-
Gemini Management 2.0.0.M01
Gemini Management is an implementation of the OSGi Enterprise JMX specification. The 2.0.x line moves up to version 5.0 of the specification with several improvements and a new MBean.
Gemini Management now includes and re-exports the ‘
org.osgi.jmx
‘ packages from the 5.0 specification meaning you don’t need to separately include the APIs in your runtime. This first milestone hasn’t been checked against the specifications compliance suite yet but it will be before the final release. Some non-spec additions from the 1.0.x releases have been removed from Gemini Management as they have been superseded by new additions to the specification. This mainly affects thebundleState
MBean which now allows for listing bundles with only certain information given now being selected by name instead of by an integer mask.The main new addition is the new
wiringState
MBean. It allows the wiring of bundles to be explored including previous revisions of a bundle and the closure of a bundles wiring. In the case of package imports and exports this MBean gives much better information than thepackageState
MBean.Their are two extensions to the
serviceState
MBean that allows for additional inspections of services based on the bundle registering or consuming the service. They have been found very useful in Virgo and are defined with these two additions to theserviceState
Mbean API./** * Answer the list of services representing the services this bundle exports * * @param bundleId - the bundle identifier * @return the list of services * @throws IOException if the operation fails * @throws IllegalArgumentException if the bundle indicated does not exist */ CompositeData[] getRegisteredServices(long bundleId) throws IOException; /** * Answer the list of services which refer to the the services this bundle is using * * @param bundleIdentifier - the bundle identifier * @return the list of servics * @throws IOException if the operation fails * @throws IllegalArgumentException if the bundle indicated does not exist */ CompositeData[] getServicesInUse(long bundleIdentifier) throws IOException;
Before the final release the code will be run against the 5.0 specifications compliance suite and any bugs fixed. In the mean time the the milestone can be downloaded from the projects Eclipse website here.
-
Gemini Management, soon…
Gemini Management is a set of JMX MBeans for managing your OSGi runtime. We released the first Milestone last week and will hopefully do a full release in the near future. Gemini Management implements the JMX Specification Version 1.0 of the OSGi Service Platform Enterprise Specification, Version 4.2, section 124. To learn more about Gemini Management you can read the documentation or see the getting started guide on the wiki. The top level Gemini project contains several sub-projects that implement different OSGi enterprise specifications. It has been around a while now but you may still be interested in the original project proposal.
I’m working to implement changes in the next version of the OSGi Enterprise Specification but I’m more interested in adding support for an OSGi runtime that is split in to multiple areas, such as Subsystems or Regions. This means it has to deal with the possibility of multiple instances of Configuration Admin, bundles that are obfuscated from one another and duplicated bundle names and versions. This is because Virgo makes use of Regions and I’m looking to include Gemini Management in the next release of Virgo. It’ll be another part of Virgo that is standards based which is always a good thing. It’s also part of a bigger plan for a new Admin Console for Virgo, but how to consume MBeans in a browser. Jolokia, a neat project that exports the contents of the MBeanServer over HTTP as JSON data. Even better, it comes packaged as a single OSGi bundle. I think Jolokia and Gemini Management make a great combo and will be powering the new Virgo Admin Console out sometime in 2012.
-
Virgo 3.0 (Maya) RC2
The second Release Candidate of Virgo 3.0 (Maya) is available for download. See the release notes for details.
RC2 has minor updates from RC1. The documentation has been finished and is now also frozen for release. The version of Equinox has been updated to the stable Indigo version. The separate Snaps download has also moved to RC2 with a much neater download package which includes the Virgo Snaps Guide and a comprehensive sample application along with all the sources.
RC2 of Virgo Tomcat Server embeds Gemini Web 2.0 RC2 which now comes with documentation in the form of a User Guide plus a minimal Programmer Guide, these are now a part of the download package.
We encourage users to give RC2 a go and provide feedback via bugzilla or the Virgo forum. Unless critical bugs are found this will be released as 3.0, probably towards the end of August.
-
Extending Virgo with a HttpService
Several people have asked about us providing a packaging of Virgo that includes the OSGi HttpService. We don’t have any plans to do so because it’s so easy to extend Virgo with extra function yourself. I’m using the Equinox HttpService as the desired extra function here but the same approach applies no matter what you want to extend Virgo with.
All you need is the latest Virgo Kernel download, the Equinox HttpServer jar and it’s dependency the Servlet API jar. Unzip the Kernel and copy the two jars in to one of the repos. You have a choice of ‘repository/ext’ or ‘repository/usr’.
In this case ‘ext’ is the better choice as these bundles are being used to extend the core functionality of Virgo. If they were dependencies of an application then ‘usr’ would be the better choice.
There are two configuration files to edit.
- The ‘config/org.eclipse.virgo.kernel.userregion.properties’ file. At the very bottom, specify an additional initial artifact. The artifacts listed here will be started before any applications are installed. We need to list the Equinox HttpService bundle. The value is comma separated so after adding the new bundle you should have something like.
initialArtifacts = repository:plan/org.eclipse.virgo.kernel.userregion.springdm, repository:bundle/org.eclipse.equinox.http
- The HttpService requires some configuration itself, it needs to know which port to run on. This is given with the ‘org.osgi.service.http.port’ property and can be specified in the ‘lib/org.eclipse.virgo.kernel.launch.properties’ file.
org.osgi.service.http.port=8080
That’s all there is to it, start the kernel up and before any applications are installed the HttpService will be available. This is the same approach that should be used to extend Virgo in any other way and is exactly how the Tomcat and Jetty packages of Virgo are constructed. If you have extended Virgo in some way, let us know.