A question about Transactions in adba

Alexander Kjäll alexander.kjall at gmail.com
Sat Nov 24 19:27:24 UTC 2018


I have some questions about the Session.transactionCompletion() method
and TransactionOutcome class.

Based on the example in Examples.transaction and the javadoc it looks
like an transaction should be started when transactionCompletion() is
called, this returns an TransactionOutcome object that can later be
used to complete the transaction.

1) Why isn't the transactionCompletion() method an operation on the
same format as the other methods, starting an transaction requires
network communication for postgresql and there is need of an mechanism
to handle errors.
2) Is it required that it's the same TransactionOutcome object that is
returned by starting the transaction that is used to commit/rollback
3) What should happen if transactionCompletion() is called multiple
times without an commit/rollback, should the same object be returned
or is it allowed to return new ones?

best regards
Alexander Kjäll

More information about the jdbc-spec-discuss mailing list