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

PoolFactory.getPool() method implements the "Double Checked Locking" idiom which is broken. #8

Open
GoogleCodeExporter opened this issue Jun 21, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Depending on platform, JVM, and concurrent load, concurrent calls to the 
getPool() method of the PoolFactory class may result in a crash.
2.
3.

What is the expected output? What do you see instead?
It is expected that many threads may concurrently call getPool() on the same 
PoolFactory, and the same correctly initialized pool must be returned. It is 
possible however for the program to crash.

What version of the product are you using? On what operating system?
version 1.1.2 on Windows 7

Please provide any additional information below.
Check the internet for "Double Checked Locking in Java" to see exactly why the 
PoolFactory class is broken in a subtle way, and also how to easily fix it for 
J2SE 1.5 and later.

Original issue reported on code.google.com by i.t.chri...@gmail.com on 4 Jan 2015 at 11:01

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

No branches or pull requests

1 participant