Home > Eclipse, General, Java > Dynamic Swing OSGi Demo

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

Categories: Eclipse, General, Java Tags:
  1. November 26th, 2008 at 01:07 | #1

    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. November 26th, 2008 at 13:50 | #2

    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. December 3rd, 2008 at 12:49 | #3

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

  4. December 3rd, 2008 at 14:04 | #4

    Hi Davide,

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

  5. December 3rd, 2008 at 15:28 | #5

    Hi Kai,
    yes, I did. I tried at https://max-server.myftp.org:444/svn/pm usr:anonymous, pwd:

  6. December 4th, 2008 at 18:00 | #6

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

  7. March 25th, 2009 at 19:36 | #7

    Since I had some difficulties setting the target platform in 3.4.2 and your description of this important step is a one sentence hint i would think of pointing people to the preferences page of eclipse so no one else have the same problems starting to test your great app.
    Link http://eclipsesource.com/blogs/2009/02/24/target-platform-changes/

  1. December 1st, 2008 at 19:45 | #1
  2. May 23rd, 2009 at 16:31 | #2
  3. September 16th, 2009 at 23:13 | #3