[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6689) DefaultMergeEventListener changes CheckNullability flag - not thread save

John SMith (JIRA) noreply at atlassian.com
Tue Oct 4 07:00:22 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43948#comment-43948 ] 

John SMith commented on HHH-6689:
---------------------------------

Have not managed to create a simple test case where this bug can be replicated, but with ongoing load testing, it is happening frequently.  We have managed to remove all of the scenarios from our application code where null checking causes us a problem - except for one exception which occurs at approx line 104 in DefaultMergeEventListener.java

if ( isNullabilityCheckedGlobal( event.getSession() ) ) {
	throw new TransientObjectException(
		"one or more objects is an unsaved transient instance - save transient instance(s) before merging: " +
		transientEntityNames );
}



> DefaultMergeEventListener changes CheckNullability flag - not thread save
> -------------------------------------------------------------------------
>
>                 Key: HHH-6689
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6689
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.5
>         Environment: Websphere Application Server 7.0,  DB2,  Windows Server, Hibernate 3.6.5
>            Reporter: John SMith
>              Labels: hibernate
>
> saveTransientEntity() method saves the CheckNullability setting,  changes it using the getFactory().getSettings().setCheckNullability  method, and does save processing.   After save processing, the saved value is restored.
> During load testing, we have had situations where the CheckNullability becomes set to TRUE and causes failures because of null checks.
> It has been difficult to debug, but it appears that this is not thread safe - multiple threads accessing this method can change the value of this setting.
> It can also be that a database error can cause an exception that will cause the checkNullability flan not to be reset.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list