...
- You don't need separate deployment units and separate XML configuration files for each of your components. Just add a new entry in your Spring XML file to use a new component. So its a more lightweight approach.
- You don't need to learn a new XML configuration file syntax, just stick to Spring if you already know it
- You can use the various nice features in Spring (aliasing, using expandable properties to keep login/passwords outside of the XML etc).
- You can take advantage of POJO support to write light weight JBI components in a POJO style
Its It's also worth pointing out that a single component can be used in a Spring configuration or in a traditional JBI deployment unit without any code changes so you are free to choose either approach.
...
Configuring using Spring XML
So lets let's see how to wire together a couple of components with Spring. The easiest way to get started is to see an example. The following configuration is taken from these examples.
...
We introduce a few new XML tags for JBI configuration, but apart from that you can use all of the regular Spring configuration tags - bean, property, value etc. For example, inside the <container> tag you can configure properties on the JBI container itself using <property> tags. Inside each <component> tag hyou you can configure properties on the componenetcomponent. This allows you to mix and match regular Spring configuration of POJOs with our JBI Spring configuration mechanism.
...
- Configure an instance of the SpringJBIContainer as a regular Spring POJO.
- Configure the components you wish to deploy as regular Spring POJOs
- List the components you want to deploy in the componentNames property of the JBI container.
Here is an example of that in action.
Related Documentation
The following tutorial shows how to create JBI components using the Spring Client Toolkit.