-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
1.2.6.Final
-
None
-
- have a JTA transaction with 1 second timeout
- sleep 1 ms
- run very long query
- the query should have query timeout of 1 s (and so it should be aborted), but it gets no timeout at all
When using <set-tx-query-timeout>true</set-tx-query-timeout, the query timeout is applied, unless less than 1 second remains until transaction timeout.
This is due to a typo in code converting transaction timeout (millis) into jdbc timeout (seconds).
Widlfy 9.0.2 uses IronJacama 1.2.5, so here's the code (https://github.com/ironjacamar/ironjacamar/blob/ironjacamar-1.2.5.Final/adapters/src/main/java/org/jboss/jca/adapters/jdbc/WrapperDataSource.java#L207):
long result = timeout / 1000; if ((result % 1000) != 0) // <------ the `timeout % 1000` was supposed to be ++result;
- duplicates
-
JBJCA-1355 set-tx-query-timeout does not work when the remaining transaction timeout is shorter than one second
- Resolved