tyrex.tm
public abstract class TransactionDomain extends Object
A transaction domain defines the policy for all transactions created from that domain, such as default timeout, maximum number of open transactions, IIOP support, and journaling. In addition, the domain maintains resource managers such as JDBC data sources and JCA connectors.
The application server obtains a transaction manager or user transaction object, and managed resources from the transaction domain.
Transaction domains are created from a domain configuration file. For more information about domain configuration files, refer to the relevant documentation and domain.xsd.
A newly created transaction domain is in the state READY.
The recover
method must be called in order to make it
active (ACTIVE). The domain can be deactivated by calling
terminate
.
Version: $Revision: 1.24 $ $Date: 2004/04/30 06:35:00 $
Field Summary | |
---|---|
static int | ACTIVE
Domain active status. |
static int | READY
Domain ready status. |
static int | RECOVERING
Domain recovery status. |
static int | TERMINATED
Domain terminated status. |
Method Summary | |
---|---|
abstract void | addInterceptor(TransactionInterceptor interceptor)
Adds a transaction interceptor to this transaction domain.
|
static TransactionDomain | createDomain(String url)
Creates a new transaction domain from the specified domain
configuration file.
|
static TransactionDomain | createDomain(InputStream stream)
Creates a new transaction domain from the specified domain
configuration file.
|
static TransactionDomain | createDomain(InputSource source)
Creates a new transaction domain from the specified domain
configuration file.
|
static TransactionDomain | getDomain(String name)
Returns a transaction domain with the specified name. |
abstract DomainMetrics | getDomainMetrics()
Returns the transaction domain metrics.
|
abstract String | getDomainName()
Returns the transaction domain name.
|
abstract Resources | getResources()
Returns resources installed for this transaction domain.
|
abstract int | getState()
Returns the transaction domain state.
|
static Transaction | getTransaction(Xid xid)
Returns a transaction based on the transaction identifier.
|
static Transaction | getTransaction(String xid)
Returns a transaction based on the transaction identifier.
|
abstract TransactionFactory | getTransactionFactory()
Returns an OTS transaction factory for this transaction domain.
|
abstract TransactionManager | getTransactionManager()
Returns a transaction manager for this transaction domain.
|
abstract UserTransaction | getUserTransaction()
Returns a user transaction for this transaction domain.
|
abstract void | recover()
Called to initiate recovery. |
abstract void | removeInterceptor(TransactionInterceptor interceptor)
Removes a transaction interceptor to this transaction domain.
|
abstract void | terminate()
Terminates the transaction domain. |
Parameters: interceptor The transaction interceptor
This method throws an exception if a transaction domain with the same name already exists, or the transaction domain could not be created.
Parameters: url URL for the transaction domain configuration file
Returns: A new transaction domain
UNKNOWN: DomainConfigurationException An error occured while attempting to create the domain, or a transaction domain with the same name already exists
This method throws an exception if a transaction domain with the same name already exists, or the transaction domain could not be created.
Parameters: steam Input stream for the transaction domain configuration file
Returns: A new transaction domain
UNKNOWN: DomainConfigurationException An error occured while attempting to create the domain, or a transaction domain with the same name already exists
This method throws an exception if a transaction domain with the same name already exists, or the transaction domain could not be created.
Parameters: source SAX input source for the transaction domain configuration file
Returns: A new transaction domain
UNKNOWN: DomainConfigurationException An error occured while attempting to create the domain, or a transaction domain with the same name already exists
Parameters: name The name of the transaction domain
Returns: The transaction domain, or if no such domain
Returns: The transaction domain metrics
Returns: The transaction domain name
Initially the resource list is based on resources defined in the domain configuration file. This method can be used to add new resources or disable existing resources.
Returns: Resources installed for this transaction domain
The initial state for a transaction domain is READY. The domain
transitions to ACTIVE after recovery has completed by calling
recover
.
The domain transitions to TERMINATED after it has been terminated
by calling terminate
.
Returns: The transaction domain state
Returns the transaction object is the transaction is known to any transaction domain. The transaction may be in the prepared or complete state.
Parameters: xid The transaction identifier
Returns: The transaction, or null if no such transaction exists
Returns the transaction object is the transaction is known to any transaction domain. The transaction may be in the prepared or complete state.
The transaction identifier is a string obtained by calling toString() on the transaction or Xid object.
Parameters: xid The transaction identifier
Returns: The transaction, or null if no such transaction exists
The transaction factory can be used to create and re-create OTS transactions in this domain only. It is also used to identify the ORB by implementing TransactionService.
Calling this method multiple times will return the same instance of the transaction factory.
Returns: The transaction factory for this domain
The transaction managed can be used to begin, commit and rollback transactions in this domain only.
Calling this method multiple times will return the same instance of the transaction manager.
Returns: The transaction manager for this domain
The user transaction can be used to begin, commit and rollback transactions in this domain only.
Calling this method multiple times will return the same instance of the user transaction.
Returns: The user transaction for this domain
Throws: RecoveryException A chain of errors reported during recovery
Parameters: interceptor The transaction interceptor