DOTS and automatic startup of bundles

Domino OSGi Tasklet Container (or DOTS for short) is an uber-cool OpenNTF project that allows you to write addins for the Domino server in Java. The project used to be called JAVADDIN which kind of gives the purpose away.

At UKLUG I was asked if there was a way to specify which bundles to automatically start at server startup. I didn’t know the answer so I wrote an e-mail to David Taieb who’s the author of the project and he quickly responded that this is indeed possible. Below is Davids answer:

Yes, you can create a file called config.ini in
{data}/domino/workspace directory and add the following line
domino.osgi.bundles.start=pluginid1,pluginId2,pluginId3

Restart http task and verify that the plugins specified are
active
>tell http osgi diag pluginId1
>tell http osgi diag pluginId2
>tell http osgi diag pluginId3

Best Regards
-david

The above is for Domino 8.5.3 – for Domino 8.5.2 the config.ini file is in the workspace.config directory.

There is a caveat though. The automatic startup isn’t performed until an XPage request is made. An extension point to make bundles automatically startup when the server is started will be added for Domino 8.5.4.

7 thoughts on “DOTS and automatic startup of bundles”

  1. I’m pretty sure that DOTS can run plugins at server startup without any XPage requests involved.

    What David was probably talking about is the HTTP server’s OSGi framework, which is running separately from the DOTS OSGi framework and is part of the standard Domino server install (in contrast to DOTS).

    For the HTTP OSGi framework, there is no way to launch plugins at HTTP task startup at the moment.

    The only way here is to use the following extension point:

    < extension point="com.ibm.commons.Extension" >

             < service type="

    com.ibm.designer.runtime.extensions.RuntimeInitializationEvent" class=

    "com.acme.test.MyInitializationClass" / >

    < /extension >

    which launches a plugin when the first XPage is requested.

    As a workaround for the missing extension point for task startup, you could create a Java agent configured to run at server startup and use e.g. the Apache HTTP client to request an XPage programmatically. That works, but is not really a great solution.

    I asked David to add the extension point to 8.5.3, but it’s already too late and he assured me he would add it to the next Domino release.

    Like

  2. Yes, Karsten is right DOTS and Domino OSGi on Http work differently on startup. DOTS will activate the plugins right away and Domino OSGi on Http will do so lazily upon the first XPages/Equinox request.

    I am planning to fix this for the next release by adding a startup extension point similar to org.eclipse.ui.startup.

    I also encourage people to check out the concept of OSGi profile that I implemented in the latest version of DOTS on openNTF, which provides more powerful OSGi configuration options including automatically start plugins and specify their start level. I would be interested for feedback on this feature in the DOTS openNTF project discussion page.

    Like

  3. So in DOTS 1.6, you have 2 ways of automatically start your plugins:

    1.use org.openntf.javaddin.startup extension point

    2.use OSGi profile as follow:

    <osgiProfile …>

    <osgiOptions clean=”true”>

    <startPlugin id=”myFirstPlugin@2″/>

    <startPlugin id=”mySecondPlugin@4/>

    </osgiOptions>

    </osgiProfile>

    Both of these methods are documented with sample code in the readme pdf of DOTS 1.6

    Like

  4. Hello Mikkel,

    thank you very much for writing to David for me. I feel a little embarassed you made it sooner than I did 🙂

    As Karsten pointed out I was really talking about HTTP server’s OSGi.

    Anyway thank you and David for the inormation.

    Like

  5.  So, 6+ years later, on 9.0.1 FP9 has an extension point similar to org.eclipse.ui.startup been added for Domino OSGi on Http?  I can’t find any reference to it.  Forgive me for not knowing where to look if it is plain as day…

    Like

Comments are closed.