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

Hibernate: avoid potential deadlock on c3p0 #235

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mokomull
Copy link

If StartGameHandler takes the last connection available in the c3p0
pool, then Game.start() will block inside sessionProvider.get(). But
since this is nested within, StartGameHandler never gets to the
finally block where it releases its connection.

Testing done

mvn clean package war:war, ran a local stress test and I am no longer seeing Tomcat HTTP threads stuck inside AjaxHandler.

If StartGameHandler takes the last connection available in the c3p0
pool, then Game.start() will block inside sessionProvider.get().  But
since this is nested within, StartGameHandler never gets to the
`finally` block where it releases its connection.
Copy link
Owner

@ajanata ajanata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same re: merge conflicts right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants