[jboss-jira] [JBoss JIRA] (HIBERNATE-152) ServiceRegistry race condition
Steve Ebersole (JIRA)
issues at jboss.org
Thu Nov 19 09:57:00 EST 2015
[ https://issues.jboss.org/browse/HIBERNATE-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HIBERNATE-152.
------------------------------------
Resolution: Rejected
> ServiceRegistry race condition
> ------------------------------
>
> Key: HIBERNATE-152
> URL: https://issues.jboss.org/browse/HIBERNATE-152
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: rob moffat
> Assignee: Steve Ebersole
> Priority: Minor
>
> If I have multiple threads, all trying to use StatementPreparer, then what happens is that they all get a RefCursorSupport from the service registry, and start using it.
> The problem is, the initialisation process is: 1) create the instance of RefCursorSupport, 2) add it to the service registry, 3) then initialise the fields on it (specifically, jdbcServices).
> However, because the object is available from the service registry after creation, but before initialisation, the other threads can pull this back and start using it without jdbcServices initialised.
> This is a pervasive problem for all the objects in the service registry which have injected services that they depend on, I would think. I'm very surprised this hasn't been spotted sooner and fixed.
> cheers,
> Rob
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list