This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes data retrival in spring batch framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "data retrival in spring batch framework" Watch "data retrival in spring batch framework" New topic

data retrival in spring batch framework

Hitesh Gupta

Joined: Jul 03, 2008
Posts: 15

We have a Java process that pings the DB (mainframe DB2) at a predefined frequency. If Java process finds some data in DB it reads and processes that data and inserts the data in IBM MQ using JMS.

We are now planning to migrate it to WAS with support for Load Balancing and Clustering environments. We have decided to use Spring Batch Framework.


Now in a multi clustered environment, suppose if some data is there in DB2 and is updated in MQ by java program running in one cluster. How can we ensure that once data is retrieved from one cluster, it should not be repeated by other java program running in differnet cluster. Otheriwse it will lead to duplicate data in MQ by differnet clusters.

May be if we put some flag checks in java to comply to it. But in a multi clustered environment, how we can achieve this.

Rajah Nagur
Ranch Hand

Joined: Nov 06, 2002
Posts: 239
How about using "Select for Update" sql construct?
The Java process will read the rows , process and delete the records (or update a flag) in one atomic transaction.

You can't wake a person who is <b><i>pretending</i></b> to be asleep.<br />Like what <b>"it"</b> does not like - <i> Gurdjieff </i>
puneet dhiman

Joined: Apr 10, 2008
Posts: 5

We are stucked in similar situation, how you achieved this?


SCJP 95%
I agree. Here's the link:
subject: data retrival in spring batch framework
It's not a secret anymore!