Versions Compared

Key

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

...

Next we need to set up the services.xml for this component, since this is such a simple example we are able to reverse the logic from the first component so this this component provides the interface on itself.

Code Block
xml
xml

<!-- This is where we are able to declare the ins and outs of the Service
 	  as consumes and provides elements,  the service-names and endpoints
 	  will be used to activate the JBI endpoints,  and we can use the 
 	  interface-name to determine which one we want to call and also which
 	  bean is going to receive the actual JBI exchange -->
<services binding-component="false"
	xmlns:timer="http://tempuri.org/timer"
	xmlns:logger="http://tempuri.org/logger">
	<provides interface-name="timer:notification"
		service-name="logger:write" />
</services>

And once again we need to configure the spring container to create an instance of our bean in the src/main/jbi/META-INF/jbi-spring.xml file, shown below:

Code Block
xml
xml

<beans>
	<!--  This is going to be where we declare the beans that we want the
		   SpringComponent container to build -->
	<bean id="myLogger"
		class="org.servicemix.tutorial.LoggerComponent">		
	</bean> 
</beans>

And that completes the writing of a recieving component, and as with the first component we need to build this component ready for deployment to a JBI server (in our case the wonderful ServiceMix)..TO BE COMPLETED