I am performing several SQL statements using single connections and statement objects as two processes.
My procedure steps are as follows:
- During performing the expected SQL statement using the statement object created during the pre-process.
- Creating a Contribution Object and Set Auto Comit ()
- Then I pass the same Statement Object and execute the required SQL Statement for the post process.
- Finally close the transaction (
connection.commit ();
) and close Connection, Statement Objects.
My problem is this:
Sometimes the post execution statements are not reflected in the database that is, if I include any records in post-processing Or update, they are not available in the records database.
But post-process execution is working fine without exception.
The probability of this case is out of 1/5 (which means that I used to expect 4x work but its problematic 1 time).
Can anyone tell any problem?
I am using Jdk 1.7 and Postgresql version 9.3.
No comments:
Post a Comment