on 2011 Jun 27 6:49 AM
Hi All,
I have a file to JDBC scenario where i have used JDBC lookup to get the last count from database and i am incrementing the count when ever i run the interface.
for particular Field ex:XYZ i have made as a * primary key* in my table DB table(to avoid duplication).
when i run single file i am able to fetch the count from DB and pass the incremented to respective table in DB
Now the problem is:
if there are two files in source folder two files got picked up and trying to access DB count (LOOKUP) simultaneously
When i place multiple files in the source location multiple files are picking at a time and trying to fetch the count simultaneously from DB and failing in Receiver adapter i am unable to pass UNIQUE value to the field for which i have set as a PRIMARY KEY in such cases.
Would appreciate if any one suggest the solution
Thanks in advance,
Naveen
Request clarification before answering.
Hi,
i feel it is bad design to perform JDBC look up to retrive value from Table to increase the count.
what you can do here is Enter time stamp value in Primary Key,time stamp always different , so you no need to perfrom once more time to get count value.
if i understood your req wrongly,ignore my suggestion.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
21 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.