[Hibernate-JIRA] Created: (HHH-7239) centralize before/after transaction callbacks in TransactionCoordinator
by Shawn Clowater (JIRA)
centralize before/after transaction callbacks in TransactionCoordinator
-----------------------------------------------------------------------
Key: HHH-7239
URL: https://hibernate.onjira.com/browse/HHH-7239
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.1.2
Environment: Hibernate 4.1.2, database n/a
Reporter: Shawn Clowater
There are 2 issues that came to light during extended testing of the Shared Transaction impl.
1st issue is that when a Session is opened during a shared transaction scenario it registers a TransactionObserver with the TransactionCoordinatorImpl to perform operations such as managedFlush and manageClose calls on the child sessions. This observer is not release until the transaction completes so even if the session is closed it can never be garbage collected.
2nd issue is that the afterTransaction/beforeTransaction processes are registered with the ActionQueue belonging to a Session and when the transaction coordinator completes the transaction it only calls the afterTransactionCompletion on the Session that owns the TransactionCoordinator and not any of the child sessions.
Originally suggested that the session remove itself from the observer list on close and that the created observer should also call the before/after transaction methods but an alternative solution was discussed where the TransactionCoordinator and not the ActionQueue would be where the after transaction processes are registered. The ActionQueue would register actions with the Coordinator vs. keeping its own lists.
Test cases showing both scenarios to follow shortly.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[Hibernate-JIRA] Created: (HHH-7187) envers tests fail on other DBs except the default H2
by Strong Liu (JIRA)
envers tests fail on other DBs except the default H2
----------------------------------------------------
Key: HHH-7187
URL: https://hibernate.onjira.com/browse/HHH-7187
Project: Hibernate ORM
Issue Type: Bug
Components: envers
Reporter: Strong Liu
Fix For: 4.1.2
due to the change of HHH-7185, there are some failing tests:
{quote}
All Failed Tests
Test Name
Duration
Age
>>> org.hibernate.envers.test.integration.jta.JtaExceptionListener.testTransactionRollback[0] 0.016 1
>>> org.hibernate.envers.test.integration.jta.JtaExceptionListener.testDataNotPersisted[0] 0.084 1
>>> org.hibernate.envers.test.integration.jta.JtaExceptionListener.testTransactionRollback[1] 0.01 1
>>> org.hibernate.envers.test.integration.jta.JtaExceptionListener.testDataNotPersisted[1] 0.013 1
>>> org.hibernate.envers.test.integration.manytomany.unidirectional.M2MIndexedListNotAuditedTarget.initData[0] 0.097 1
>>> org.hibernate.envers.test.integration.manytomany.unidirectional.M2MIndexedListNotAuditedTarget.testHistory1[0] 0.0050 1
>>> org.hibernate.envers.test.integration.manytomany.unidirectional.M2MIndexedListNotAuditedTarget.testHistory2[0] 0.0010 1
>>> org.hibernate.envers.test.integration.manytomany.unidirectional.M2MIndexedListNotAuditedTarget.testRevisionsCounts[0] 0.0020 1
>>> org.hibernate.envers.test.integration.manytomany.unidirectional.M2MIndexedListNotAuditedTarget.initData[1] 0.115 1
>>> org.hibernate.envers.test.integration.manytomany.unidirectional.M2MIndexedListNotAuditedTarget.testHistory1[1] 0.0010 1
>>> org.hibernate.envers.test.integration.manytomany.unidirectional.M2MIndexedListNotAuditedTarget.testHistory2[1] 0.0010 1
>>> org.hibernate.envers.test.integration.manytomany.unidirectional.M2MIndexedListNotAuditedTarget.testRevisionsCounts[1] 0.0 1
>>> org.hibernate.envers.test.integration.naming.BasicNaming.testHistoryOfId1[0] 0.048 1
>>> org.hibernate.envers.test.integration.naming.BasicNaming.testHistoryOfId2[0] 0.029 1
>>> org.hibernate.envers.test.integration.naming.BasicNaming.testRevisionsCounts[0] 0.016 1
>>> org.hibernate.envers.test.integration.naming.BasicNaming.testHistoryOfId1[1] 0.041 1
>>> org.hibernate.envers.test.integration.naming.BasicNaming.testHistoryOfId2[1] 0.025 1
>>> org.hibernate.envers.test.integration.naming.BasicNaming.testRevisionsCounts[1] 0.03 1
>>> org.hibernate.envers.test.integration.naming.EstonianTableAlias.testAuditChildTableAlias[0] 0.033 1
>>> org.hibernate.envers.test.integration.naming.EstonianTableAlias.testAuditChildTableAlias[1] 0.044 1
>>> org.hibernate.envers.test.integration.naming.VersionsJoinTableNaming.testHistoryOfUniId1[0] 0.108 1
>>> org.hibernate.envers.test.integration.naming.VersionsJoinTableNaming.testRevisionsCounts[0] 0.031 1
>>> org.hibernate.envers.test.integration.readwriteexpression.ReadWriteExpressionChange.shouldRespectWriteExpression[0] 0.0030 1
>>> org.hibernate.envers.test.integration.readwriteexpression.ReadWriteExpressionChange.shouldRespectWriteExpression[1] 0.0040 1
>>> org.hibernate.envers.test.integration.reventity.CustomDate.testDatesForRevisions[0] 0.0090 1
>>> org.hibernate.envers.test.integration.reventity.CustomDate.testFindRevision[0] 0.0050 1
>>> org.hibernate.envers.test.integration.reventity.CustomDate.testRevisionsForDates[0] 0.012 1
>>> org.hibernate.envers.test.integration.reventity.CustomDate.testTimestamps[0] 0.0030 1
>>> org.hibernate.envers.test.integration.reventity.CustomDate.testTimestamps1[0] 0.0040 1
>>> org.hibernate.envers.test.integration.reventity.CustomDate.testDatesForRevisions[1] 0.0070 1
>>> org.hibernate.envers.test.integration.reventity.CustomDate.testFindRevision[1] 0.0040 1
>>> org.hibernate.envers.test.integration.reventity.CustomDate.testRevisionsForDates[1] 0.027 1
>>> org.hibernate.envers.test.integration.reventity.CustomDate.testTimestamps[1] 0.014 1
>>> org.hibernate.envers.test.integration.reventity.CustomDate.testTimestamps1[1] 0.015 1
>>> org.hibernate.envers.test.integration.reventity.DifferentDBSchemaTest.initData[0] 0.0090 1
>>> org.hibernate.envers.test.integration.reventity.DifferentDBSchemaTest.testHistoryOfId1[0] 0.0010 1
>>> org.hibernate.envers.test.integration.reventity.DifferentDBSchemaTest.testRevisionsCounts[0] 0.0 1
>>> org.hibernate.envers.test.integration.reventity.DifferentDBSchemaTest.initData[1] 0.0060 1
>>> org.hibernate.envers.test.integration.reventity.DifferentDBSchemaTest.testHistoryOfId1[1] 0.0090 1
>>> org.hibernate.envers.test.integration.reventity.DifferentDBSchemaTest.testRevisionsCounts[1] 0.0 1
>>> org.hibernate.envers.test.integration.strategy.ValidityAuditStrategyRevEndTsTest.testAllRevEndTimeStamps[0] 0.145 1
>>> org.hibernate.envers.test.integration.strategy.ValidityAuditStrategyRevEndTsTest.testAllRevEndTimeStamps[1] 0.173 1
{quote}
this is caused by the _org.hibernate.envers.test.EnversTestingJtaBootstrap#updateConfigAndCreateTM_, this class updates the db connection url and appends a `;AUTOCOMMIT=OFF`, but this property is only valid on H2
do tests using _org.hibernate.envers.test.EnversTestingJtaBootstrap_ are supposed only running on H2?
if so, we need move those tests into _src/test/main_
or we need to fix these tests
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[Hibernate-JIRA] Created: (HHH-6801) UUIDBinaryType generates column of type BINARY(255) instead of BINARY(16) in MySQL
by Artem Gelun (JIRA)
UUIDBinaryType generates column of type BINARY(255) instead of BINARY(16) in MySQL
----------------------------------------------------------------------------------
Key: HHH-6801
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6801
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.8
Environment: MySQL 5.1 InnoDB
Custom dialect (see HHH-6800)
Reporter: Artem Gelun
Property definition:
{code:xml}
<property access="field" name="uuid" not-null="true" type="uuid-binary">
<column name="MI_UUID" not-null="true"/>
</property>
{code}
Debug:
{code}
00:13:35,312 DEBUG SchemaExport:415 - create table PCS_MI (MI_CONTAINER bigint not null, MI_ID integer not null, MI_CODE varchar(255), MI_NAME varchar(255), MI_DESCRIPTION varchar(255), MI_TYPE bigint, MI_STATE_CALC_RULE varchar(255), MI_STATE_DICT bigint, MI_EMERG_CALC_RULE varchar(255), MI_ISACTIVE bit default true not null, MI_PARENT_CONTAINER bigint, MI_PARENT_ID integer, MI_UUID binary(255) not null, primary key (MI_CONTAINER, MI_ID)) ENGINE=InnoDB
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months