cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC scenario doubt

Former Member
0 Kudos

Hi,

I have a scenario but am not about the approach. I would appreciate it if you could share your ideas.

Scenario: We have a DB from which we are going to take data executing a Stored Procedure created at the DB side. Then we sent the data to R3 using ABAP Proxy

Solution: JDBC Sender is executing the stored procedure. the procedure select's the data, sent it, and flag it. PI takes it and sents it to R3 via proxy.

Problem: The problem here is what will happen if the connection is interrupted WHILE the procedure is executed. So that we dont get the data but the procedure flags the rows in the DB.

Can this happen? If yes how can I avoid it?

Thanks.

Arman

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Why are you using a stored procedure?

The select and update statement are part of the JDBC sender.

The JDBC sender will only flag the records in the DB after they have been received in XI...

Former Member
0 Kudos

I am using Stored Procedure because the are too many rows inside the table and every second new rows are added. So the stored procedure is going to sum the rows and send it that way to PI. Also the R3 side is going to have it easier this way.

-


Hi Bhavesh,

I am not updating the flag. the stored procedure is going to do this. There is were the problem lies. Is it possible that I cant receive the data BUT the stored procedure is updating the fields?

Former Member
0 Kudos

Arman,

If you set option "serializable" to your JDBC sender, it's no problem that your db gets updated every few seconds.

Former Member
0 Kudos

you should use SELECT and UPDATE to avoid this. Since you are updating before even the data is sent to XI.

Former Member
0 Kudos

Yes, that is the problem I have. The other guys insist in using a stored procedure. So the only think which comes to my mind is to make a synch scenario using BPM. Which is going to complicate it much more.

Is there another solution which I dont know?

Former Member
0 Kudos

Hi,

XI always issue an explicit commit after the call. Ideally there should not be an explicit commit issued within the procedure, So in case there is a transaction failure this will not get committed.

So iterating back to what Bhavesh's comment should work.

Regards

Unni

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

The select and update query are updated in a single atomic transaction and you can be rest assured that XI takes care of this implicitly.

Check the JDBC adapter FAQ on service market place for more info!

Regards

Bhavesh