On 12/12/17 22:54, George News wrote:
I'm planning on changing the class/methods call hierarchy in order to
use transactions only on the upper levels, so this way I will be only
opening one transaction and handle everything within it. The problem is
that this is a major change, and will remove the autonomy from each
class, but if this is the price to make the code stable I will have to
do so.
Txn and explicit control will bite you.
Then from your comment above, and this one (which I hope code doesn't
bite ;)) I will be changing the code to remove references to begin/end
and try to use Txn as much as possible.
However, I cannot do for every part of the code, as the ResultSet is
handle in different functions (one begin() transaction, another
presents/adapts results and end transaction()). The main problem is that
this transaction is the outer one.
try(QueryExecution qExec = ...) {
ResultSet rs = ResultSetFactory.copyResults(qExec.exexSelect());
return rs;
}
Once copied, the result set is not dependent dataset and so not
dependent on the transaction.
Andy