
Originally Posted by
neilac333
I am curious if this makes sense in the following ways:
- Whether this is an appropriate use case for SI
- How I am deploying SI
- The adding of the SI jars to all the other applications
- The way that SI is used to do the marshalling and unmarshalling
Ok, I am going to think out loud here. I felt prompted to respond because I struggled with understanding the same thing at first. Now I get to check if I really got it
I'm sure one of the SpringSource guys will correct me if I go wrong.
I think one important aspect is to understand the distinction between logical communication between components (represented by channels, aggregators, splitters etc) on the one side, and the physical transport adapters, which are some kind of channel-adapter (for example: <jms:inbound-channel-adapter />, on the other side.
The Cafe sample-app is a great example of the *logical* config. I think splitting the Cafe app in to multiple JVM's and connecting them again using SI adapters, to form the same logical unit is a good way of getting a feel for this distinction.
So yes, in order for any component to use SI, it will require some SI-specific (channels, endpoints etc) config and at the very least the spring integration jar on board. To be able to connect it to components that live in another JVM, you will also require some kind of physical transport mechanism to allow these components to communicate. That is where the SI adapters come in.
Marshalling and Unmarshalling is dependent on the form of physical transport you use. JMS uses a Java serialization, web-services have to serialize to XML.
In your particular case I would imagine running the authentication service and configuring all the necessary adapters so that requests may reach your service through multiple ways of physical transport (Spring-WS, RMI, JMS etc etc) The clients needn't be aware of SI. They are simply calling a web-service or some http-invoker method. All these requests would follow the same path:
client => [physical transport] => [physical adapter] => logical SI channel => your authentication service (using a <service-activator />)
So what would you have won by Using SI? 
- You would have to do only one deployment of your physical service
- You can replace some homegrown-code by SI-config
- You have a clear way forward when another form of transport is required.
- You have used a well-documented tool to achieve this
Hans Westerbeek
Software Engineer