|
Oracle® Data Integrator Java API Reference 11g Release 1 (11.1.1.9.0) E17060-05 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ITransactionDefinition
Interface that defines ODI transaction properties. Based on the propagation behavior definitions analogous to EJB CMT attributes.
| Field Summary | |
|---|---|
static int |
PROPAGATION_MANDATORYSupport a current transaction; throw an exception if no current transaction exists. |
static int |
PROPAGATION_NEVERDo not support a current transaction; throw an exception if a current transaction exists. |
static int |
PROPAGATION_NOT_SUPPORTEDDo not support a current transaction; rather always execute non-transactionally. |
static int |
PROPAGATION_REQUIREDSupport a current transaction; create a new one if none exists. |
static int |
PROPAGATION_REQUIRES_NEWCreate a new transaction, suspending the current transaction if one exists. |
static int |
PROPAGATION_SUPPORTSSupport a current transaction; execute non-transactionally if none exists. |
static int |
TIMEOUT_DEFAULTUse the default timeout of the underlying transaction system, or none if timeouts are not supported. |
| Method Summary | |
|---|---|
IOdiEntityManager |
getExtendedPersistentContext()Return extended persistence context. |
java.lang.String |
getName()Return the name of this transaction. |
int |
getPropagationBehavior()Return the propagation behavior. |
int |
getTimeout()Return the transaction timeout. |
| Field Detail |
|---|
static final int PROPAGATION_MANDATORY
Note that transaction synchronization within a PROPAGATION_MANDATORY scope will always be driven by the surrounding transaction.
static final int PROPAGATION_NEVER
Note that transaction synchronization is not available within a PROPAGATION_NEVER scope.
static final int PROPAGATION_NOT_SUPPORTED
NOTE: Actual transaction suspension will not work out-of-the-box on all transaction managers. This in particular applies to org.springframework.transaction.jta.JtaTransactionManager, which requires the javax.transaction.TransactionManager to be made available it to it (which is server-specific in standard J2EE).
Note that transaction synchronization is not available within a PROPAGATION_NOT_SUPPORTED scope. Existing synchronizations will be suspended and resumed appropriately.
static final int PROPAGATION_REQUIRED
This is typically the default setting of a transaction definition, and typically defines a transaction synchronization scope.
static final int PROPAGATION_REQUIRES_NEW
NOTE: Actual transaction suspension will not work out-of-the-box on all transaction managers. This in particular applies to org.springframework.transaction.jta.JtaTransactionManager, which requires the javax.transaction.TransactionManager to be made available it to it (which is server-specific in standard J2EE).
A PROPAGATION_REQUIRES_NEW scope always defines its own transaction synchronizations. Existing synchronizations will be suspended and resumed appropriately.
static final int PROPAGATION_SUPPORTS
NOTE: For transaction managers with transaction synchronization, PROPAGATION_SUPPORTS is slightly different from no transaction at all, as it defines a transaction scope that synchronization might apply to. As a consequence, the same resources (a JDBC Connection, a Hibernate Session, etc) will be shared for the entire specified scope. Note that the exact behavior depends on the actual synchronization configuration of the transaction manager!
In general, use PROPAGATION_SUPPORTS with care! In particular, do not rely on PROPAGATION_REQUIRED or PROPAGATION_REQUIRES_NEW within a PROPAGATION_SUPPORTS scope (which may lead to synchronization conflicts at runtime). If such nesting is unavoidable, make sure to configure your transaction manager appropriately (typically switching to "synchronization on actual transaction").
static final int TIMEOUT_DEFAULT
| Method Detail |
|---|
java.lang.String getName()
int getPropagationBehavior()
Must return one of the PROPAGATION_XXX constants defined on this interface.
int getTimeout()
Must return a number of seconds, or DefaultTransactionDefinition.TIMEOUT_DEFAULT.
IOdiEntityManager getExtendedPersistentContext()
IOdiEntityManager, or null if undefined / not used.
|
Oracle® Data Integrator Java API Reference 11g Release 1 (11.1.1.9.0) E17060-05 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||