tyrex.tm.impl
Class DomainConfig

java.lang.Object
  extended bytyrex.tm.impl.DomainConfig

public final class DomainConfig
extends java.lang.Object

Domain configuration object read from the domain configuration file and used to construct a new transaction domain.

Version:
$Revision: 1.9 $ $Date: 2002/04/17 00:53:22 $
Author:
Assaf Arkin

Field Summary
static int DEFAULT_TIMEOUT
          The default timeout for all transactions.
static int DEFAULT_WAIT_NEW
          The default timeout waiting to begin a new transaction when maximum limit exceeded.
static int MAXIMUM_TIMEOUT
          The maximum possible timeout for a transaction.
static int NO_LIMIT
          Value indicating no limit on the maximum number of concurrent top-level transactions allowed.
 
Constructor Summary
DomainConfig()
           
 
Method Summary
 TransactionDomain getDomain()
          Returns a transaction domain based on this configuration.
 int getMaximum()
          Returns the maximum number of concurrent top-level transactions supported.
 java.lang.String getName()
          Return the name of the transaction domain.
 Resources getResources()
          Returns the resources list associated with this transaction domain.
 int getTimeout()
          Returns the default transaction timeout in seconds.
 int getWaitNew()
          Returns the time to wait for a new transaction when limit exceeded, specified in seconds.
 void setMaximum(int maximum)
          Sets the maximum number of concurrent top-level transactions supported.
 void setName(java.lang.String name)
          Sets the name of the transaction domain.
 void setResources(Resources resources)
          Sets the resources list associated with this transaction domain.
 void setTimeout(int timeout)
          Returns the default transaction timeout in seconds.
 void setWaitNew(int timeout)
          Sets the time to wait for a new transaction when limit exceeded, specified in seconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_LIMIT

public static final int NO_LIMIT
Value indicating no limit on the maximum number of concurrent top-level transactions allowed. This value is zero.

See Also:
Constant Field Values

DEFAULT_TIMEOUT

public static final int DEFAULT_TIMEOUT
The default timeout for all transactions. This value is used unless the transaction transaction manager has been requested to use a different value. The default value is 120 seconds.

See Also:
Constant Field Values

DEFAULT_WAIT_NEW

public static final int DEFAULT_WAIT_NEW
The default timeout waiting to begin a new transaction when maximum limit exceeded. The default value is 5 seconds.

See Also:
Constant Field Values

MAXIMUM_TIMEOUT

public static final int MAXIMUM_TIMEOUT
The maximum possible timeout for a transaction. This is ten minutes, specified as seconds.

See Also:
Constant Field Values
Constructor Detail

DomainConfig

public DomainConfig()
Method Detail

getName

public java.lang.String getName()
Return the name of the transaction domain.

Returns:
Name of transaction domain

setName

public void setName(java.lang.String name)
Sets the name of the transaction domain.

Parameters:
name - Name of transaction domain

getMaximum

public int getMaximum()
Returns the maximum number of concurrent top-level transactions supported. The value NO_LIMIT indicates unlimited number of transactions.

Returns:
The maximum number of concurrent top-level transactions

setMaximum

public void setMaximum(int maximum)
Sets the maximum number of concurrent top-level transactions supported. The value NO_LIMIT indicates unlimited number of transactions.

Parameters:
maximum - The maximum number of concurrent top-level transactions

getTimeout

public int getTimeout()
Returns the default transaction timeout in seconds. This value applies to all new transactions created in this domain, unless overridden by the transaction manager.

The actual value is kept in the range one to MAXIMUM_TIMEOUT. The value zero is understood to be the default value, or DEFAULT_TIMEOUT.

Returns:
The default transaction timeout in seconds

setTimeout

public void setTimeout(int timeout)
Returns the default transaction timeout in seconds. This value applies to all new transactions created in this domain, unless overridden by the transaction manager.

The actual value is kept in the range one to MAXIMUM_TIMEOUT. The value zero is understood to be the default value, or DEFAULT_TIMEOUT.

Parameters:
timeout - The default transaction timeout in seconds

getWaitNew

public int getWaitNew()
Returns the time to wait for a new transaction when limit exceeded, specified in seconds.

When the maximum number of concurrent transactions have exceeded, any attempt to create a new transaction will block until a new transaction can be created or this timeout has been reached.

Returns:
The time to wait to begin a new transaction when limit exceeded, specified in seconds

setWaitNew

public void setWaitNew(int timeout)
Sets the time to wait for a new transaction when limit exceeded, specified in seconds.

When the maximum number of concurrent transactions have exceeded, any attempt to create a new transaction will block until a new transaction can be created or this timeout has been reached.

Parameters:
timeout - The time to wait to begin a new transaction when limit exceeded, specified in seconds

getDomain

public TransactionDomain getDomain()
                            throws DomainConfigurationException
Returns a transaction domain based on this configuration. This method attempts to create a new transaction domain using the configuration. The same transaction domain will be returned if this method is called multiple times.

Returns:
A transaction domain based on this configuration
Throws:
DomainConfigurationException - The transaction domain configuration is invalid

getResources

public Resources getResources()
Returns the resources list associated with this transaction domain.

Returns:
The resources list

setResources

public void setResources(Resources resources)
Sets the resources list associated with this transaction domain.

Parameters:
resources - The resources list


Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.