Announcement Announcement Module
No announcement yet.
Service Export from Web-Application Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Service Export from Web-Application


    We are trying to migrate our quite large system to Spring DM Server. As a temporary solution we may need to export OSGi service from our WAR. Is it technically possible?

    Thank in advance

  • #2
    Yes, that's definitely possible. Take a look at our programmers guide for information on how to use Spring DM in an application. Essentially, you need to get Spring DM to create a bean which is defined to be the service in question. There are (slightly) more complicated options if that doesn't fit your existing application well, such as creating a bean which is "bundle context aware" and then publishing the service programmatically.

    The WAR file will need to share the interface of the service with the bundles or WARs that need to use the service. So you'll need to import or export the package containing the interface.

    Hope that's sufficient. Please post back if you get stuck or need more pointers.