Phil Steitz wrote:
4. The isolation level tries to be set and you get an error like this:
Do you have testOnBorrow or testOnReturn set to true? Do you have a
validationQuery defined?
Neither are defined.
Try setting testOnBorrow=true and supplying a validationQuery. This
will cause connections to be validated when they are borrowed from
the pool.
Phil
To clarify what the the problem seems to be:
1. Connection obtain from pool. AutoCommit is set as true.
2. Oracle performs a DDL operation that fails and causes SQLException.
Although autoCommit is still set as true, there is now a transaction
that has been started.
3. Connection released back to pool. The
PoolableConnectionFactory.passivateObject() method does not try to roll
back the transaction as autoCommit is true and so assumes there can be
no open transaction in place.
4. Same connection is obtained from pool again.
5. Transaction isolation level is changed -> Exception as there is
already an ongoing transaction.
If instead an explicit rollback() is done at the end of step 2 then all
is OK.
Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]