• Are OSGi Tasklets available for XPages?

    By Nathan T Freeman 1 decade ago

    I know there's some separation of processes here, so could you clarify? If I use the osginsf: strategy to provide OSGI tasklets, will those be visible to XPages applications?

    Because if so, that would be a VERY GOOD THING.

    • Response

      By David Taieb 1 decade ago

      OSGi Tasklets contributed to DOTS are by default not  visible to XPages. This is because the OSGi containers for Http and dots tasks are loading different set of plugins. You could contribute the plugin where your OSGi tasklet live to the Http OSGi, but it won't resolve because of missing dependencies. So unless we port the entire OSGit tasklet Container over to the Http task (which is technically possible but there are no plan at the moment to do that), you won't be able to run tasklets in XPages.

      However, if all you need is trigger a long running task within XPages you can always use eclipse Jobs to do that. Of course, you won't get all the features provided by the Tasklet Container like scheduling, event triggering, built-in OSGi command to communicate with the framework, etc... 

      I would also add a work of caution not to overuse eclipse jobs within the Http task as each job runs in its own thread and you could potentially decrease performances.

      I am also currently exploring different ways of letting XPages drive the tasklet container by using remote requests (see example in this release of OSGi Tasklet Service) but also other IPC means. I would love to hear some use cases on that in this forum.

      -david

      • Use case

        By Nathan T Freeman 1 decade ago

        Actually, the use case is quite simple: I want to use the osginsf:// approach for deploying my plugins for XPages, starting with the Extension Library. I was thrilled to see that appear in this release, but if the plugins that are loaded are not visible to the HTTP task, then I guess it doesn't help me yet. :(

        • Just to be clear...

          By David Taieb 1 decade ago

          You absolutely can contribute NSF Based plugins in XPages in 8.5.3 CD4. The concept is very similar e.g.

          1. You create an updatesite database based on the updateSite.ntf template
          2. Upload your plugins
          3. Specify the database path via the OSGI_HTTP_DYNAMIC_BUNDLES notes.ini variable

          All these steps are documented in Domino 8.5.3 CD4.

          As you can notice, the only difference with OSGi Tasklet Service 1.5 is that the nsf is specified via an osginsf url in the OSGi profile site element, whereas we use a notes.ini variable (without the osginsf url, just the db path) in XPages.

          In OSGi tasklet services, I use an xml profile because it allows me to declaratively configure things like security permissions and select which features I want to load from the nsf.

          -david