[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5929) PooledLoOptimizer in conjunction with SequenceStyleGenerator is not thread-safe

Robin Sander (JIRA) noreply at atlassian.com
Mon Feb 14 10:20:05 EST 2011


PooledLoOptimizer in conjunction with SequenceStyleGenerator is not thread-safe
-------------------------------------------------------------------------------

                 Key: HHH-5929
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5929
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.6.1
         Environment: Hibernate 3.6.1, Java 6, Mac OS 10.6.6
            Reporter: Robin Sander


The generate method of the PooledLoOptimizer introduced in 3.6.1 is not synchronized in difference to the one in PooledOptimizer and in other Optimizer implementations. The problem is that some IdentifierGenerator implementations have themselve a synchronized generate method (like SequenceHiLoGenerator e.g.) and some don't, like the new SequenceStyleGenerator.
According to the javadoc IdentifierGenerator implementations have to be thread-safe. Now I don't know if there is any agreement among the developers whether this thread-safety is to be achieved in the IdentifierGenerator itself or in the Optimizer most of them delegate to but what I know is that SequenceStyleGenerator in conjunction with PooledLoOptimizer is not thread-safe because neither of them guards against concurrent access in any way.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list