This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
Sure. It sounds like you just want to add a reference to an Executor instance via the publish-subscribe-channel element's "task-executor" reference. You can even use Spring's "task" namespace to configure the Executor. Details are here: http://static.springsource.org/sprin...task-namespace
isn't it true that each service-activator may be running concurrently and not single-threaded? I would like to pin a single thread to each service-activator since the service-activator implementation is not thread-safe.
Well, if you really want to have exactly one thread per service activator, then you should probably use a simple <channel> as the input of each service-activator and then add a <dispatcher> sub-element to each of those that has a task-executor reference that is a single threaded executor. To connect all of those to a single publish-subscribe-channel you could use <bridge> elements. Simpler, but probably overly serialized, you could just use a single-threaded executor on the publish-subscribe-channel (overly serialized in this case meaning that you would not even have concurrent invocation of the different service-activator instances).
Personally, I would really try to make the service thread safe instead, even if that means adding 'synchronized' blocks to avoid concurrency at that level.