Announcement Announcement Module
No announcement yet.
OSGI declarative services Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • OSGI declarative services


    Is there a way to use DS within dm Server? We currently run DS-based applications under equinox/felix, but I'd like to try deploying them under dm Server.


  • #2
    Absolutely. dm Server uses Equinox under the covers so this should just work once a DS implementation is available in the server.

    To make a DS implementation available, to begin with at least, I'd just place it in the pickup directory. Once dm Server's installed and started the DS implementation (you'll see console output to this effect), you can then copy the bundle(s) of your DB-based application into the pickup directory too.

    If for any reason this doesn't work, please let us know.


    • #3
      I've managed to deploy equinox DS service. For that I put two bundles into the pickup directory:
      • org.eclipse.equinox.util_1.0.0.v20080414.jar
      • org.eclipse.equinox.ds_1.0.0.v20080427-0830.jar

      BTW, is it possible to replace Eclipse OSGI bundle (lib/org.eclipse.osgi-3.4.2.R34x_v20080826-1230.jar) with a newer version? I tryed just replacing the file - and the system failed to start stating some missing classes in trace - it seemed like it didn't load that new bundle.

      After I put one of my bundles into pickup dir - DS actually managed it, and registered a service according to component.xml of that bundle. But it managed none of the others. Maybe there are some missing constraints (although "ss" command in the console states that everything is fine and all bundles are "active"). But I see no output from any of the bundles anywhere (all the bundles use slf4j as logging facade), so I can't figure it out for now. Anyway - can I find slf4j's output somewhere or maybe It requires some configuration?

      When running applications from within Eclipse it is possible to configure "tracing" of particular components (including DS one) - that allows seeing some verbose output. I haven't looked yet how it is done, but maybe there's an easy way of doing so with dm Server?



      • #4
        Eclipse places the debugging options in file .options and specifies path to it in the command line:

        /opt/java/bin/java -Declipse.ignoreApp=true -Dosgi.noShutdown=true [skip] -debug /path/to/workspace/.metadata/.plugins/org.eclipse.pde.core/jackfon/.options -os win32 -ws win32 -arch x86_64 -nl uk_UA -console
        And the ".options" file looks like this:
        #Master Tracing Options
        #Thu Sep 17 15:14:16 EEST 2009
        Would this work in dm Server at all? Is there any way to pass the "-debug" parameter to Eclipse?


        • #5
          I've figured out how to configure debugging in Equinox's DS bundle - it uses org.eclipse.osgi.service.debug.DebugOptions service and system properties to get it's debug configuration.