Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large transaction timeout value (Integer.MAX_VALUE for example) results in transaction expiring immediately after starting. [SPR-16316] #20863

spring-projects-issues opened this issue Dec 20, 2017 · 1 comment


Copy link

@spring-projects-issues spring-projects-issues commented Dec 20, 2017

Razvan Popian opened SPR-16316 and commented

Setting a large transaction timeout value like Integer.MAX_VALUE in the @Transactional annotation causes the transaction to timeout immediately. The problem appears to be in the setTimeoutInSeconds method in the class. The timeout in seconds is multiplied by 1000. Two ints multiplied in java result in an int so for example Integer.MAX_VALUE * 1000 equals -1000. This is why the transaction times out immediately as described..

Affects: 3.2.18, 4.3.6

Referenced from: pull request #1633, and commits e502541, b9e03cb

Backported to: 4.3.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.