Issues
- TM Transaction timeout handling in Hibernate does not handle remote (ejb) invocationsHHH-10619Resolved issue: HHH-10619Christian Beikov
- Complete org.hibernate.ejb.HibernatePersistence deprecationHHH-8543Resolved issue: HHH-8543Steve Ebersole
- Update to final versions of BV 1.1 and HV 5HHH-8218Resolved issue: HHH-8218Gunnar Morling
- Hibernate 4.x can't work with proxool 0.9.1HHH-8203Resolved issue: HHH-8203Strong Liu
- Custom ResultTransformer for JPA criteria queriesHHH-8196
- Update Teradata Dialect for Teradata 14.0HHH-8191Resolved issue: HHH-8191Brett Meyer
- Hibernate core test cases use Teradata reserved wordsHHH-8190Resolved issue: HHH-8190Christian Beikov
- Natural IDs generating one UniqueKey per ColumnHHH-8178Resolved issue: HHH-8178Brett Meyer
- hibernate-osgi dependency cannot be easily deployed into an OSGi containerHHH-8176Resolved issue: HHH-8176Brett Meyer
- AvailableSettings constants for javax.persistence.schema-generation contain spaceHHH-8173Resolved issue: HHH-8173Steve Ebersole
- A way for persisting revision data manually by calling AuditProcess.getCurrentRevisionData(session, persist)HHH-8165Resolved issue: HHH-8165
- Criteria on Enum mapping defined in hbm.xml fails.HHH-8153Resolved issue: HHH-8153Brett Meyer
- Log SQLException in DatabaseTarget with cause of schema export CREATE statement failureHHH-8138Resolved issue: HHH-8138Steve Ebersole
- Javadoc generation is currently not playing nicely with Java7 javadoc changesHHH-8137Resolved issue: HHH-8137Steve Ebersole
- Criteria selectCase() query with literals doesn't workHHH-8124Resolved issue: HHH-8124
- Persistence.createEntityManagerFactory() should run schema export if JPA properties are setHHH-8113Resolved issue: HHH-8113Steve Ebersole
- AttributeConverter doesn't override built-in type mappingsHHH-8111Resolved issue: HHH-8111Steve Ebersole
- JandexHelper.getValue() returns Boolean instead of boolean, causing ClassCastExceptionHHH-8107Resolved issue: HHH-8107Steve Ebersole
- Allow explicit package naming in persistence.xml via <class/>HHH-8086Resolved issue: HHH-8086Steve Ebersole
- Integrate Latest draft(s) of the JPA 2.1 specHHH-7957Resolved issue: HHH-7957Steve Ebersole
- Correct test issues found in CI hibernate-core-master-matrix jobHHH-7819Resolved issue: HHH-7819Brett Meyer
- JPA 2.1 code causing NPE when handling JTA transactionsHHH-7818Resolved issue: HHH-7818
- Inconsistent logic by uses of Dialect#supportsNotNullUniqueHHH-7797Resolved issue: HHH-7797Brett Meyer
- SerializableTypeTest#testNewSerializableType failing for Oracle 11G R1HHH-7734Resolved issue: HHH-7734Brett Meyer
- NativeSQLQueriesTest failing on PostgresHHH-7733Resolved issue: HHH-7733Brett Meyer
- QueryTest#testMemberOfSyntax failing on OracleHHH-7732Resolved issue: HHH-7732Brett Meyer
- session#merge should always utilize NON_CONTEXTUAL_LOB_CREATIONHHH-7731Resolved issue: HHH-7731
- SchemaExportManagedConnectionTest#testGenerateDdlToFile failing on Oracle & SybaseHHH-7730Resolved issue: HHH-7730Brett Meyer
- JpaLargeBlobTest failing on multiple DBsHHH-7724Resolved issue: HHH-7724Brett Meyer
- Clean up packagesHHH-7556Resolved issue: HHH-7556Steve Ebersole
- setMaxResults causes "ORA-00918: column ambiguously defined" exceptionHHH-951Resolved issue: HHH-951Andrea Boriero
TM Transaction timeout handling in Hibernate does not handle remote (ejb) invocations
Description
Details
Assignee
Christian BeikovChristian BeikovReporter
Scott MarlowScott MarlowLabels
Components
Affects versions
Priority
Major
Details
Details
Assignee
Reporter
Labels
Components
Affects versions
Priority
Activity
Christian BeikovJanuary 30, 2024 at 3:37 PM
I believe the original problem was fixed via https://hibernate.atlassian.net/browse/HHH-9760#icft=HHH-9760, though it's hard to track back. Anyway, closing this as out of date now.
Scott MarlowJanuary 30, 2024 at 3:33 PM
I cannot recreate this problem anymore with the original test case which I updated to Jakarta EE and also removed some non-test changes (e.g. server changes removed) originally made in the old test branch. The new test branch is https://github.com/scottmarlow/wildfly/tree/HHH-10619_txtimeoutreaper
Christian BeikovJanuary 24, 2024 at 5:34 PM
According to a discussion with Narayana folks, it should be possible to improve the handling of timeout handling by reacting to a synchronization callback: https://narayana.zulipchat.com/#narrow/stream/323715-developers/topic/Transaction.20timeout.20and.20Hibernate.20interaction
Scott MarlowMarch 15, 2016 at 9:11 PM
Some related discussion occurred on Narayana forum thread Design Discussion: Changing the reaper to use setRollbackOnly() instead of rollback() and also on Requirement for an observer SPI for tracking thread-to-transaction association changes.
In the first link on "setRollbackOnly", most of the relevant content is more toward the last few pages. The second link on "tracking thread-to-transaction association changes" is the most relevant for what we should instead be doing in Hibernate.
The idea presented in the second link, is that when the transaction manager calls Synchronization.afterCompletion(int), it is only safe to perform the desired Hibernate afterCompletion action, only if the application thread has already been disassociated from the same JTA transaction. A code example that performs this check is at https://github.com/wildfly/wildfly/blob/master/jpa/subsystem/src/main/java/org/jboss/as/jpa/transaction/TransactionUtil.java#L146. Note that the same class instance is implementing Synchronization + org.jboss.tm.listener.TransactionListener. The TransactionListener informs WildFly of when the application thread is associated/disassociated with the JTA transaction.
Scott MarlowMarch 15, 2016 at 8:38 PM
I think that https://github.com/scottmarlow/wildfly/commits/transactiontimeout_clientut_noejb is the test case that I created for this bug in WildFly. Let me know if you would like me to update it to work with the latest WildFly.
When we added Hibernate transaction time out handling for HHH-7910, we only tested for local (ejb) invocations but didn't test with remote invocations.
A test case is here that reproduces the error that can occur when remote EJB calls are performed with the same JTA transaction. The thrown error is "org.hibernate.HibernateException: Transaction was rolled back in a different thread!"