[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3001) The NoopOptimizer is not thread safe
Steve Ebersole (JIRA)
noreply at atlassian.com
Wed Jul 21 13:37:35 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=37868#action_37868 ]
Steve Ebersole commented on HHH-3001:
-------------------------------------
Laszlo,
{code:title=snippet from Optimizer.java|borderStyle=solid}
/**
* A common means to access the last value obtained from the underlying
* source. This is intended for testing purposes, since accessing the
* underlying database source directly is much more difficult.
*
* @return The last value we obtained from the underlying source;
* null indicates we have not yet consulted with the source.
*/
public IntegralDataTypeHolder getLastSourceValue();
{code}
*This is intended for testing purposes, since accessing the underlying database source directly is much more difficult.*
But yes, Maciej was correct. But the correct solution, imo and his, was making it a method-local variable.
> The NoopOptimizer is not thread safe
> ------------------------------------
>
> Key: HHH-3001
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3001
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.4.sp1, 3.2.6
> Environment: 3.2.6, 3.2.4sp1, Oracle
> Reporter: Maciej Baranowski
> Assignee: Steve Ebersole
> Fix For: 3.5.4, 3.6
>
> Attachments: testcase.src.zip
>
> Time Spent: 22m
> Remaining Estimate: 0h
>
> When SequenceStyleGenerator is used with Oracle it uses by default NoopOptimizer. The optimizer is not thread-safe and causes constraint violation errors while inserting data into the database.
--
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