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.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

concurrent invokation of one select-statement against 6 databases with same schemaPage Title Module

concurrent invokation of one select-statement against 6 databases with same schema

Jul 9th, 2009, 09:28 AM

We have 6 databases with exactly the same db-schema for different regions in our company. I want to create a web-service selecting a customer out of the 6 DBs. For this use-case i need to execute one select-statement (e.g. select * from customer where name = 'harald') against every DB. I don't want to do this in a sequence, i want them to process in parallel. The output of my WebService should list all customers named 'harald' of all DBs.

How can i use Spring Batch "Asynchronous Chunk Processing" to achive my use-case? Is Spring Batch the right framework for my use-case?

Spring Batch is not really suited to the creation of simple services like I think you have in mind. It is better suited to repetitive processing of tasks or data, not a single query (or set of queries to be aggregated).

I think Spring Integration might be closer to what you are looking for.