THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Creating the JBI Service Engine
Let's first examine the classes created by the servicemix-service-engine Maven archetype in this simple SE we're developing. These classes extend class from either the JBI spec APIs or from the servicemix-common
package. Now let's look at the classes created by the servicemix-service-engine Maven archetype:
MyBootstrap.java
- Implementsjavax.jbi.component.Boostrap
which is called by the JBI container when the component is installed and uninstalled. This is where you place logic to set up and tear down things when the component is started and stopped.
MyComponent.java
- Extends theDefaultComponent
, a convience class that makes creating JBI components much easier and provides lifecycle management of components deployed to the JBI container. This class should be fleshed out by overriding methods in theDefaultComponent
to configure and initialize the component. This is where we will place the logic to print out the Hello World message.
MyEndpoint.java
- ExtendsEndpoint
and implementsExchangeProcessor
.Endpoint
provides a referenceable resource for the component and theExchangeProcessor
provides the ability for the JBI container to process the message exchange.
Creating the Maven Subprojects For the Service Unit and Service Assembly
...