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

BeanPath.casts should be made safe for concurrent usage #1403

Closed
timowest opened this Issue Jun 1, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@timowest
Member

timowest commented Jun 1, 2015

BeanPath.casts should be made safe for concurrent usage

@bataras

This comment has been minimized.

Show comment
Hide comment
@bataras

bataras Jun 1, 2015

This and other instance fields in the hierarchy appear to make this usage pattern non-threadsafe...

JPAQuery query = getQuery();
QPartner partner = QPartner.partner; // not threadsafe due to static implementation
Partner p = query.from(partner)....

Ie, implementing a repository pattern may not be reliable.

bataras commented Jun 1, 2015

This and other instance fields in the hierarchy appear to make this usage pattern non-threadsafe...

JPAQuery query = getQuery();
QPartner partner = QPartner.partner; // not threadsafe due to static implementation
Partner p = query.from(partner)....

Ie, implementing a repository pattern may not be reliable.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jun 9, 2015

Member

Why do you think is the usage of the static default variable non threadsafe?

Member

timowest commented Jun 9, 2015

Why do you think is the usage of the static default variable non threadsafe?

@johnktims johnktims closed this in #1408 Jun 17, 2015

@timowest timowest added this to the 4.0.2 milestone Jun 17, 2015

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