Announcement Announcement Module
Collapse
No announcement yet.
RCP & dynamic Modules Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RCP & dynamic Modules

    Hi everyone,

    some months ago we shipped a client application, based on Spring RCP, to our customer. A new requirement is that some addons can be downloaded and installed dynamic without restart.
    Is there a way to load modules dynamic? I'd like to have a dialog where I can check which module shall be downloaded from a server and installed. NetBeans has a API for this scenario.
    Now I have to choices: porting the application to NetBeans, which means a lot of code needs to be rewritten. Or using OSGi for the existing application.
    I prefer the second option, because it sounds like a challenge
    But I simply don't know where to start with embedding an OSGi Platform in a Spring RCP. Had anyone ever a similar problem?

    Thanks in advance.

  • #2
    OSGi is currently not yet supported and as such, dynamic module loading is currently not possible.

    Comment


    • #3
      I'd suggest taking a look at Spring DM, which is a fusion of Spring and OSGi, targeted at webapps.

      Also take a look at http://www.sip-communicator.org/inde...riteGuiPlugins, which is a Swing + OSGi based app.

      Please post on the forum if you make any progress, as I'm sure many people would be interested in what you achieve. (I would be)

      Comment


      • #4
        Any progress on how to enable plugin stuff in spring rc or does anyone know "where to start" like gomtuohe904 said?

        Maybe we could learn from this example and this setup information?

        Comment


        • #5
          At the moment there's nothing planned for OSGi based development. I'm looking into some technologies myself, but merging OSGi with Spring RCP isn't that easy.

          Comment


          • #6
            > but merging OSGi with Spring RCP isn't that easy.

            Yes, I am looking into this at the moment too and recognize the difficulties. But at the moment I have some time to investigate on this.
            I posted an email on the dev list as well.

            Did you know how to solve the application-context changing problems?
            For my application it would be okay to restart the whole app on installing plugins, so it would be okay to merge the application-contexts on startup.

            Comment


            • #7
              The problem with OSGi is that it doesn't really play well with the concept of a webstart application (the main target platform for Spring RC). If you're installing a plugin, you'd want to do that on the server (so that everyone has that plugin), but in reality you'd only be installing it on your pc.
              You don't have that problem with webapps as everything is server-side.
              The mailinglist is something I tend to forget due to the excessive amount of spam on that list (trying to find the real mails between all the crap isn't easy).
              Personally, I'm quite biased on OSGi usage on rich clients. I have yet to see a big Java enterprise rich client application with plugin needs (how are software firms going to charge for professional services otherwise if all it takes is to install a plugin?). Plugins are great in an IDE, but enterprise applications? I don't know. But I'm looking into the possibilities to keep an open mind.

              Comment


              • #8
                only f.y.i I finally got it "working" so that felix says:

                Code:
                The bundle could not be resolved. Reason: Missing Constraint: Import-Package: ca.odell.glazedlists; version="0.0.0"
                So, the problem might be now to osgify all the available bundles, puh ...

                Although there seems to be other workarounds:
                http://www.nabble.com/Unresolved-sun.io-td19631558.html

                And maybe it is worth mentioning that others successfully used Spring DM and Swing:
                https://spar.dev.java.net/

                http://sourceforge.net/projects/agilercp/

                http://max-server.myftp.org/trac/mp3m/ (eclipse rcp) or http://max-server.myftp.org/trac/pm (swing app framework)

                Comment


                • #9
                  Oh, you were faster :-)

                  Here is the webstart enabled version of Kai Tödters app:

                  http://www.toedter.com/blog/?p=45

                  Comment


                  • #10
                    Indeed, I saw that one too, but it's using JSR-296, which is by a meanings of the word dead. But the ideas are sound.
                    The only that bothers me when looking into OSGi samples with Swing is the bundle hell. People talk about JAR hell, well, with OSGi you're gonna have bundle hell. Such a simple example, and you already have 10+ bundles. Might be nice to have as an end user, but as a developer this looks unpleasant to say the least...

                    Comment


                    • #11
                      That's true! But if the world would be developer driven - I guess - no one would do web development ;-)

                      So, I will further try (some hours only) if I get it working, maybe with pure OSGi (without the Spring DM stuff) ...

                      One question, to demonstrate a more meaningful plugin I would like to change the menubar. Would this be the way to do it:

                      Code:
                      Application.instance().getActiveWindow().getMenuBar().add(createCommand());

                      Comment


                      • #12
                        So, now you can guess it: I got it working.
                        But please don't ask me how ;-) it is not with Spring DM - pure OSGi and maybe a bit ugly. See this little blog post.

                        Comment

                        Working...
                        X