On 10/05/2024 05:12, Erwan Tanajaya wrote:
> Thank you for your very spiritful answer :D
> I already read the javadoc, just want to make sure what happens and
> hoping no extra effort should be taken
>
> if i default transaction isolation is 2 then i set TPB mapping and call
> setTransactionIsolation(2) will it reset or i should
> setTransactionIsolation to value other than 2 before closing the
> connection ?
Any call to setTransactionIsolation(int) with a valid isolation level
value (I highly recommend to use the constants defined in
java.sql.Connection instead of literal) will reset the value to the
value defined in the transaction mapping of the connection, removing the
overridden value.
> just for info i am using Tomcat Connection Pool.
If you explicitly configure the defaultTransactionIsolation property on
your Tomcat connection pool, Tomcat will reset it for you automatically.
Otherwise it will not touch it and you'd need to manually reset it.
Setting defaultTransactionIsolation to
Connection.TRANSACTION_READ_COMMITTED (or 2) will use the same isolation
level as Jaybird's default.
Mark
--
Mark Rotteveel