[hibernate/hibernate-orm] 4fd457: give some love to org.hibernate.Transaction
by Gavin King
Branch: refs/heads/main
Home: https://github.com/hibernate/hibernate-orm
Commit: 4fd457ef80219536c8c58eb138a03341b053e99c
https://github.com/hibernate/hibernate-orm/commit/4fd457ef80219536c8c58eb...
Author: Gavin King <gavin(a)hibernate.org>
Date: 2024-12-19 (Thu, 19 Dec 2024)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/Transaction.java
M hibernate-core/src/main/java/org/hibernate/cfg/TransactionSettings.java
M hibernate-core/src/main/java/org/hibernate/collection/spi/AbstractPersistentCollection.java
M hibernate-core/src/main/java/org/hibernate/engine/spi/CollectionEntry.java
M hibernate-core/src/main/java/org/hibernate/engine/transaction/internal/TransactionImpl.java
M hibernate-core/src/main/java/org/hibernate/engine/transaction/spi/TransactionImplementor.java
M hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java
M hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java
M hibernate-core/src/main/java/org/hibernate/resource/jdbc/internal/AbstractLogicalConnectionImplementor.java
M hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jdbc/internal/JdbcResourceLocalTransactionCoordinatorImpl.java
M hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaTransactionAdapterTransactionManagerImpl.java
M hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaTransactionAdapterUserTransactionImpl.java
M hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaTransactionCoordinatorImpl.java
M hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/StatusTranslator.java
M hibernate-core/src/main/java/org/hibernate/resource/transaction/spi/TransactionCoordinator.java
M hibernate-core/src/main/java/org/hibernate/resource/transaction/spi/TransactionStatus.java
M hibernate-core/src/test/java/org/hibernate/orm/test/jpa/NamedQueryTransactionFailureTest.java
A hibernate-core/src/test/java/org/hibernate/orm/test/transactions/TransactionLifecycleTest.java
Log Message:
-----------
give some love to org.hibernate.Transaction
also clean up some stuff in AbstractPersistentCollection
Unfortunately TransactionStatus is an SPI type, which makes
its use in the API of Transaction a bit wrong. Also, it's
weird to see dependence on an interface defined by JPA.
(However these are relatively harmless aesthetic points, so
I decided not to deprecate anything.) Instead I've added
alternative "convenience" operations.
Note on terminology: a transaction which has been "marked for
rollback only" is still an active transaction! You can still
do work in it, and that work will still be atomically rolled
back when the transaction completes. Apparently there was
some confusion on this at some point, which was later fixed,
but some evidence of the confusion was left behind in code.
To unsubscribe from these emails, change your notification settings at https://github.com/hibernate/hibernate-orm/settings/notifications
4 months, 1 week