Sunday, July 19, 2009

Finished instrumenting the running Karaf platform

I just finished a really cool feature (three really!) for the Eclipse Integration for Karaf.

First, I have nearly finished the JMX integration (pesky connection management!) and have the ability to asynchronously pull out whatever information is available. This is great because I plan on using JMX as the foundation for the management and instrumentation of running Karaf instances in the workbench.

Second and third, I have put this to good use by hooking up two Eclipse Views:

  • Bundles View - This view shows all of the bundles in the Eclipse Workbench as well as any in the Karaf instance(s) being debugged
  • Services View - This view shows all of the services in the Eclipse Workbench as well as any in the Karaf instance(s) being debugged

I started from the very useful Bundle Monitor from Neil Bartlett and worked my way the JFace and SWT code to get what I needed.

The main problem was that Neil's code was tied to a single source of data per view. That meant that the view could only render the workbench's information. This wouldn't do of course, so I switched the content providers to track OSGi Services that are registered whenever the workbench is active or when a Karaf instance is started via a launcher.

The system is fully dynamic although the JMX beans are not asynchronous so I had to wrap them in an Eclipse Job. There are a couple rough edges in the code but I think it is very useful.

My next two features are Configuration Admin and Framework Admin support. Once I have these in place I'm going back to my WTP integration efforts and polish that off so I can begin the daunting task of module hot deployment.

Oisin Hurley finally got around to blogging about this great project. Better late than never! I wonder when he's going to get around to writing some code? ( grin )

As always a picture is worth a thousand words so here you go!

No comments:

Post a Comment