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:
This Post Has 10 Comments
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.
Interesting project – feel free to take a peek at our examples for the OSGi in Action book:
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).
Pingback: Swing links of the week: November 30, 2008 : Pushing Pixels
I’m trying to checkout the project via svn but It still asks me to authenticate.
Did you try “anonymous” as user (and an empty password)? If yes, I will check the authorization configuration…
yes, I did. I tried at https://max-server.myftp.org:444/svn/pm usr:anonymous, pwd:
I was using a different SVN client: I tried from Eclipse and It works now. Well done.
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.
Pingback: Duchess | a Community of Female Java Developers
Pingback: Plugable Swing – A Hello World OSGi Example « Find Time for Java and more!