If the threads each obtain their own PreparedStatement (with
identical text), their setXXX calls do not interfere
with each other. Moreover, is
able to share the same compiled query plan between the two statements; it
needs to maintain only separate state information. However, there is the potential
for confusion in regard to the timing of the commit, since a single commit commits
all the statements in a transaction.