Results 1 to 4 of 4

Thread: How to hook into Spring DM Server

  1. #1
    Join Date
    Jan 2009
    Posts
    7

    Default [Resolved] How to hook into Spring DM Server

    Hello,

    I would like to hook into Spring DM Server.
    I have several utility bundles to start at the start up of Spring DM Server.
    These bundles are provided by Prosyst and enable the mConsole connection on a conventional OSGi application :

    com.prosyst.mbs.connector
    org.eclipse.equinox.common
    javax.microedition.io --> fragment bundle : system bundle
    org.eclipse.equinox.useradmin
    org.eclipse.equinox.preferences
    com.prosyst.mbs.pmp
    com.prosyst.mbs.putilfull
    com.prosyst.mbs.socketconn
    com.prosyst.mbs.useradmexfull

    How could I start these bundle at the DM Server start up ?

    Thanks in advance for any response.

    Mickaël.
    Last edited by Webskin; Jan 15th, 2009 at 04:35 PM.

  2. #2
    Join Date
    Oct 2008
    Posts
    493

    Default

    From your description it sounds as if the most appropriate way would be to 'package' the bundles as a subsystem, and then reference your new subsystem in your server's profile.config file.

    Take a look in the repository/bundles/subsystems directory. Each subdirectory is a dm Server subsystem. You'll want to create a new directory, containing the bundles you list above, along with a subsystem.xml file which describes your subsystem, providing its name and the defining the bundles which it contains (the order in which the bundles are listed, is the order in which they will be started by the dm Server kernel). Having made these changes you can then modify config/profile.config and add your new subsystem to those listed.

    Having made these changes, starting the server should result on the bundles in the new subsystem being automatically installed and started during dm Server's startup.
    Andy Wilkinson
    SpringSource

  3. #3
    Join Date
    Jan 2009
    Posts
    7

    Default

    Thank you it works :

    I add these bundles in the repository/bundles/usr :
    com.prosyst.mbs.putilfull-3.6.23.jar
    com.prosyst.mbs.useradmexfull-2.6.58.jar
    org.eclipse.equinox.common_3.4.0.v20080421-2006.jar
    org.eclipse.equinox.registry_3.4.0.v20080516-0950.jar

    I created this folder : repository/bundles/subsystems/com.prosyst.mbs
    and I add these bundles into the created folder :
    com.prosyst.mbs.connector-2.2.46.jar
    com.prosyst.mbs.pmp-8.2.8.jar
    com.prosyst.mbs.socketconn-2.2.52.jar
    javax.microedition.io-3.6.5.jar
    org.eclipse.equinox.preferences_3.2.201.R34x_v2008 0709.jar
    org.eclipse.equinox.useradmin_1.1.0.v20080508-1815.jar

    Still in this folder I created the file subsystem.xml which contains these lines :

    Code:
    <subsystem name="com.prosyst.mbs" description="Prosyst Subsystem">
    	<bundle symbolic-name="com.prosyst.mbs.connector"/>
    	<bundle symbolic-name="com.prosyst.mbs.socketconn"/>
    	<bundle symbolic-name="com.prosyst.mbs.pmp"/>
    	<bundle symbolic-name="org.eclipse.equinox.preferences"/>
    	<bundle symbolic-name="org.eclipse.equinox.useradmin"/>
    </subsystem>
    javax.microedition.io does not appear because it is a fragment.

    And finally I completed the config/profile.config file with this :

    Code:
    /*
     * SpringSource dm Server profile manager default configuration file.
     */
    {
    	"profile": {
    		"version" : 1.0,
    		"name" : "web",
    		"subsystems" : ["com.prosyst.mbs", "com.springsource.server.servlet", "com.springsource.server.web"],
    		"optionalSubsystems" : ["com.springsource.server.management"]
    	}
    }
    Thanks again.

    PS : What is an Optional Subsystem ?

    Mickaël.

  4. #4
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    Quote Originally Posted by Webskin View Post
    PS : What is an Optional Subsystem ?
    An optional subsystem is one whose absence will not cause dm Server to fail to start. We currently use it to configure a management subsystem which is present only in the enterprise version of the product.
    Glyn Normington
    SpringSource

Posting Permissions

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