Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Spring DM and Eclipse RCP

  1. #11
    Join Date
    Jul 2008
    Posts
    9

    Default

    Hi all,

    My RCP plugin depends on :
    org.springframework.bundle.osgi.core
    org.springframework.bundle.osgi.extender
    org.springframework.bundle.osgi.io
    org.springframework.bundle.spring
    org.springframework.osgi.backport.util.concurrent

    but Spring DM is not ACTIVE with the default config.ini

    I know I can make it working by adding the @start in my config.ini but doing this ruins my product export... Of course I could still edit the config.ini automatically generated by the Eclipse Product Export Wizard but I think there is a brighter solution...

    Has someone a clue on how to start SpringDM without customizing the config.ini ?

  2. #12
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    the extender is a bundle at the end of the day - config.ini allows you to automatically start the bundle at startup. Whether you start the extender or start another bundle that in effect, starts the extender is your choice but you need to start at least one bundle after starting the platform.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #13
    Join Date
    Jul 2008
    Posts
    9

    Default

    thanks for your answer Costin.
    I'm not sure I understand what you mean by 'the extender is a bundle at the end of the day'...
    Anyway, what is the best way to make my bundle effectively start the extender ? Do I have to investigate the Osgi API ?

  4. #14
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    If I understand it correctly the issue is with RCP Product Export which seem to override your changes. After all it is your product and you should be able to do and configure whatever you want.
    As to "he extender is a bundle at the end of the day" - Extender is just another bundle as any other bundle in your Target Platform. That is the beauty of OSGi is the ability to make your Target Platform anything you want. Spring-DM is really a bunch of utility bundles that make development and deployment of Spring based applications inside of OSGi platform simple and elegant. For example: Extender bundle will see the Application Context and would bootstrap it for you

  5. #15
    Join Date
    Jun 2007
    Location
    Nantes, France
    Posts
    44

    Default

    Quote Originally Posted by MrMagne View Post
    Has someone a clue on how to start SpringDM without customizing the config.ini ?
    What you can do is start manually Spring-DM bundle when your application starts. You can do it from the start() method of your RCP application main bundle.
    The BundleContext argument passed to this method can be used to get all the installed bundles. You can use getBundles() to find the extender bundle and then start it.
    On application shutdown you can use the same way to stop Spring-dm extender.
    EscapeK - http://www.escapek.org - Open source project for IT ecosystem management

  6. #16
    Join Date
    Jul 2008
    Posts
    9

    Default

    Thanks for your answers, I used this code:
    Code:
    		Bundle springDM = Platform
    				.getBundle("org.springframework.bundle.osgi.extender");
    		springDM.start();
    in my Activator#start() method, it seems to work well.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •