Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:osgi="http://www.springframework.org/schema/osgi"
  xsi:schemaLocation="
      http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/osgi
      http://www.springframework.org/schema/osgi/spring-osgi.xsd">

    <osgi:service ref="incidentDAO" interface="org.apache.camel.example.reportincident.dao.IncidentDAO"/>

</beans>

The osgi:service xml tag tell namespace tells to Spring Dynamic Modules to register the interface org.apache.camel.example.reportincident.dao.IncidentDAO as a service in the OSGI registry. This feature proposed by Spring will be part of the next OSGI specification R4.2 under the name of Blueprint - RFC 124.

Remark :

...

Like in the service reportincident.persistence, we will replace our pom.xml file with the one provide in the zip file. As you can see in the <Import-Package>, we will import here the class required by the service :

  • org.apache.camel.example.reportincident.dao

Adding this line in the Import-Package is not enough to have access to the OSGI service. To use the service, we will add the code.

Routing/Mediation service

...