java.lang.Object | |
↳ | org.hibernate.transaction.JTATransactionFactory |
Factory for JTATransaction
instances.
TransactionFactory
implementation can support both models.
For complete JTA implementations (including dependence on JNDI), the
UserTransaction reference is obtained by a call to
resolveInitialContext(Properties)
. Hibernate will then attempt to locate the
UserTransaction within this resolved
InitialContext based on the namespace returned by
resolveUserTransactionName(Properties)
.
For the so-called stand-alone implementations, we do not care at
all about the JNDI aspects just described. Here, the implementation would
have a specific manner to obtain a reference to its contextual
UserTransaction; usually this would be a static code reference, but
again it varies. Anyway, for each implementation the integration would need
to override the getUserTransaction()
method and return the appropriate
thing.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DEFAULT_USER_TRANSACTION_NAME |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
initialContext | |||||||||||
userTransactionName |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Are all transaction callbacks local to Hibernate Transactions?
Or can the callbacks originate from some other source (e.g.
| |||||||||||
Configure this transaction factory.
| |||||||||||
Begin a transaction and return the associated Transaction instance.
| |||||||||||
Get the default connection release mode.
| |||||||||||
Determine whether an underlying transaction is in progress.
| |||||||||||
Do we require access to the JTA TransactionManager for
this strategy?
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Getter for property 'initialContext'.
| |||||||||||
Get the UserTransaction reference.
| |||||||||||
Getter for property 'userTransactionName'.
| |||||||||||
Given the lot of Hibernate configuration properties, resolve appropriate
reference to JNDI
InitialContext . | |||||||||||
Given the lot of Hibernate configuration properties, resolve appropriate
JNDI namespace to use for UserTransaction resolution.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.hibernate.transaction.TransactionFactory
|
Are all transaction callbacks local to Hibernate Transactions? Or can the callbacks originate from some other source (e.g. a JTA Synchronization).
Transaction
; false otherwise.
Configure this transaction factory. Specifically here we are attempting to
resolve both an InitialContext
as well as the
JNDI namespace
for the UserTransaction.
props | The configuration properties |
---|
HibernateException |
---|
Begin a transaction and return the associated Transaction instance.
jdbcContext | The jdbc context to which the transaction belongs |
---|---|
transactionContext | The contract regarding the context in which this transaction will operate. |
HibernateException |
---|
Get the default connection release mode.
Determine whether an underlying transaction is in progress.
Mainly this is used in determining whether to register a synchronization as well as whether or not to circumvent auto flushing outside transactions.jdbcContext | The JDBC context |
---|---|
transactionContext | The transaction context |
transaction | The Hibernate transaction |
Do we require access to the JTA TransactionManager for this strategy?
Getter for property 'initialContext'.
Get the UserTransaction reference.
Getter for property 'userTransactionName'. The algorithm here is
Given the lot of Hibernate configuration properties, resolve appropriate
reference to JNDI InitialContext
.
hibernate.jndi.url
and
hibernate.jndi.class
properties | The Hibernate config properties. |
---|
Given the lot of Hibernate configuration properties, resolve appropriate JNDI namespace to use for UserTransaction resolution.
We determine the namespace to use byjta.UserTransaction
config propertyTransactionManagerLookup
was indicated, use its
getUserTransactionName()
DEFAULT_USER_TRANSACTION_NAME
properties | The Hibernate config properties. |
---|