wwerner's blog

tutorials, tips and trivia on eclipse, osgi, web & xml technologies

Archive for the ‘equinox’ tag

OSGi Console in Helios, Monkey See/Monkey Do and a strange loop

with 4 comments

Helios comes with an OSGi console that is accessible from the GUI directly. This reminded me of the existence of an API to add custom commands to the console. I found this to be a simple and powerful concept; yet I perceive this feature to be rarely used in practice.
With equinox being used on the server more and more, adding your own custom application management commands is a simple way to provide for executing application specific maintenance tasks. How about a command that gathers all logs, creates a heap dump, zips everything, puts it onto an FTP server and sends you the download link by mail? Or perhaps you simply want to run some sanity checks?

In this post, we’ll create a custom command for the OSGi console that simply executes a JUnit test and prints the results.

More importantly, we’ll have to snoop around in internal eclipse packages to figure out how to attach the command to the existing console. We’ll try to do our snooping effectively. And we’ll exploit the dynamic nature of OSGi to streamline our development/build/test cycle (and thats gonna be fun).


read more ...

Written by Wolfgang Werner

June 29th, 2010 at 11:52 pm

Building web services on Equinox and Restlet #3

with 7 comments

After having implemented the server application, we want to prepare ourselves for future changes. We want to be able to add new services to our application without impacting existing ones. We also may want to change the structure of the URIs in case they are not cool.

To do so, we’ll create extension points and the supporting code for the Restlet types used and contribute our implementations and see how that this helps us making our application more flexible and maintainable.

We’ll learn how to define an extension point, how to contribute to it and how to work with the contributions.


read more ...

Written by Wolfgang Werner

May 5th, 2010 at 1:09 am