public class HibernateJtaTransactionManagerAdapter extends java.lang.Object implements javax.transaction.TransactionManager
Adapter for adding transaction controlling hooks for supporting
Hibernate's org.hibernate.engine.transaction.Isolater class's interaction with transactions
This is required when there is no real JTA transaction manager in use and Spring's
org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy is used.
Without this solution, using Hibernate's TableGenerator identity strategies will fail to support transactions.
The id generator will commit the current transaction and break transactional behaviour.
The javadoc of Hibernate's TableHiLoGenerator
states this. However this isn't mentioned in the javadocs of other TableGenerators.
Constructor and description |
---|
HibernateJtaTransactionManagerAdapter
(org.springframework.transaction.PlatformTransactionManager springTransactionManager) |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
begin() |
|
public void |
commit() |
|
protected static int |
convertToJtaStatus(org.springframework.transaction.TransactionStatus status) |
|
protected org.springframework.transaction.TransactionStatus |
getAndRemoveStatus() |
|
public int |
getStatus() |
|
public Transaction |
getTransaction() |
|
public void |
resume(Transaction tobj) |
|
public void |
rollback() |
|
public void |
setRollbackOnly() |
|
public void |
setTransactionTimeout(int seconds) |
|
public Transaction |
suspend() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |