Dynamic Swing OSGi Demo

I am preparing a few talks about dynamic OSGi applications. To get my hands dirty I started a little demo project to showcase different scenarios. That SWT works very well with OSGi is obvious, since Eclipse RCP is based on OSGi. But there are not many Swing based OSGi applications out there. That’s why I started playing around with the dynamic creation and deletion of Swing GUI.

The demo application shows how to use OSGi Declarative Services (DS) and Spring Dynamic Modules (Spring DM) together with Swing UI (and the Swing Application Framework, JSR 296). The goal of this project is to share best practices when it comes to dynamic OSGi-based applications.

The project home page is http://max-server.myftp.org/trac/pm. There you find a bit of documentation and how to get the sources from svn. The current implementation works well with Equinox, I haven’t tried out other OSGi implementations yet.

I would appreciate if OSGi experts take a look at the source code and help me improving the code base. Here is a screen shot:

Have fun!

Kai

This Post Has 10 Comments

  1. Alex Blewitt

    I agree that Swing apps using OSGi might dispel the myth that you need to use SWT. I put together a screencast and demo in conjunction with Neil Bartlett at http://www.eclipsezone.com/files/jsig/ for exactly that purpose. Of course as a live demo it couldn’t explore much but does give an idea of what it can do. Keep up the good work.

  2. Stuart McCulloch

    Interesting project – feel free to take a peek at our examples for the OSGi in Action book:

    http://code.google.com/p/osgi-in-action/

    it includes a Swing based paint program in three flavours: one for each OSGi layer (modularity, lifecycle – extender pattern, services – whiteboard pattern) to show that you can pick and choose which parts of OSGi you want to use.

    There’s also some low-level examples of dealing with service dynamics (we’ll be providing examples for the various component models like DS later on).

  3. Davide Raccagni

    Hi,
    I’m trying to checkout the project via svn but It still asks me to authenticate.

  4. Kai Tödter

    Hi Davide,

    Did you try “anonymous” as user (and an empty password)? If yes, I will check the authorization configuration…

  5. Davide Raccagni

    hi Kai,
    I was using a different SVN client: I tried from Eclipse and It works now. Well done.

Leave a Reply

I accept the Privacy Policy