org.compass.core.config
Class CompassEnvironment.Transaction

java.lang.Object
  extended by org.compass.core.config.CompassEnvironment.Transaction
Enclosing class:
CompassEnvironment

public abstract class CompassEnvironment.Transaction
extends Object


Field Summary
static String CACHE_USER_TRANSACTION
          Set whether to cache the JTA UserTransaction object fetched from JNDI.
static String COMMIT_BEFORE_COMPLETION
          For transaction factories that uses synchronization, commits the transaction in the beforeCompletion stage.
static String DISABLE_AUTO_JOIN_SESSION
          When opening a session, Compass tries to automatically start a transaction and join it.
static String DISABLE_THREAD_BOUND_LOCAL_TRANSATION
          This settings allows to disable the default behaviour of the Local transaction factory to bind the session / transaction to the local thread.
static String FACTORY
          Sets the transaction factory to be used (LocalTransactionFactory for example).
static String ISOLATION
          The transaction isolation, can be one of the 4 constants values.
static String ISOLATION_BATCH_INSERT
          Deprecated. Use LUCENE transaction isolation instead, defaults to it
static String ISOLATION_CLASS
          The transaction isolation class name that will be used as the transaction.
static String ISOLATION_LUCENE
          Used as the value for the TRANSACTION_ISOLATION setting.
static String ISOLATION_NONE
          Used as the value for the TRANSACTION_ISOLATION setting.
static String ISOLATION_READ_COMMITTED
          Used as the value for the TRANSACTION_ISOLATION setting.
static String ISOLATION_READ_UNCOMMITTED
          Used as the value for the TRANSACTION_ISOLATION setting.
static String ISOLATION_REPEATABLE_READ
          Used as the value for the TRANSACTION_ISOLATION setting.
static String ISOLATION_SERIALIZABLE
          Used as the value for the TRANSACTION_ISOLATION setting.
static String MANAGER_LOOKUP
          TransactionManagerLookup implementor to use for obtaining the TransactionManager
static String TRANSACTION_TIMEOUT
          Configures the transaction timeout (JTA or Spring).
static String USER_TRANSACTION
          JNDI name of JTA UserTransaction object
 
Constructor Summary
CompassEnvironment.Transaction()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY

public static final String FACTORY
Sets the transaction factory to be used (LocalTransactionFactory for example).

See Also:
Constant Field Values

COMMIT_BEFORE_COMPLETION

public static final String COMMIT_BEFORE_COMPLETION
For transaction factories that uses synchronization, commits the transaction in the beforeCompletion stage. Relevant transaction factories are JTA and Spring.

Can have true or false values, defaults to false.

Must be set when using a jdbc based index, and must not be used in other cases!.

See Also:
Constant Field Values

MANAGER_LOOKUP

public static final String MANAGER_LOOKUP
TransactionManagerLookup implementor to use for obtaining the TransactionManager

See Also:
Constant Field Values

USER_TRANSACTION

public static final String USER_TRANSACTION
JNDI name of JTA UserTransaction object

See Also:
Constant Field Values

CACHE_USER_TRANSACTION

public static final String CACHE_USER_TRANSACTION
Set whether to cache the JTA UserTransaction object fetched from JNDI.

Default is "true": UserTransaction lookup will only happen at startup, reusing the same UserTransaction handle for all transactions of all threads. This is the most efficient choice for all application servers that provide a shared UserTransaction object (the typical case).

Turn this flag off to enforce a fresh lookup of the UserTransaction for every transaction. This is only necessary for application servers that return a new UserTransaction for every transaction, keeping state tied to the UserTransaction object itself rather than the current thread.

See Also:
Constant Field Values

ISOLATION

public static final String ISOLATION
The transaction isolation, can be one of the 4 constants values.

See Also:
Constant Field Values

ISOLATION_CLASS

public static final String ISOLATION_CLASS
The transaction isolation class name that will be used as the transaction. Overrides the TRANSACTION_ISOLATION if set.

See Also:
Constant Field Values

ISOLATION_NONE

public static final String ISOLATION_NONE
Used as the value for the TRANSACTION_ISOLATION setting. Configures the transaction isolation level to have no support for transactions.

See Also:
Constant Field Values

ISOLATION_READ_UNCOMMITTED

public static final String ISOLATION_READ_UNCOMMITTED
Used as the value for the TRANSACTION_ISOLATION setting. Configures the transaction isolation level to have a read uncommitted support for transactions. Dirty reads, non-repeatable reads and phantom reads can occur.

See Also:
Constant Field Values

ISOLATION_READ_COMMITTED

public static final String ISOLATION_READ_COMMITTED
Used as the value for the TRANSACTION_ISOLATION setting. Configures the transaction isolation level to have a read committed support for transactions. Dirty reads are prevented, non-repeatable reads and phantom reads can occur.

See Also:
Constant Field Values

ISOLATION_REPEATABLE_READ

public static final String ISOLATION_REPEATABLE_READ
Used as the value for the TRANSACTION_ISOLATION setting. Configures the transaction isolation level to have a repeatable read support for transactions. Dirty reads and non-repeatable reads are prevented, phantom reads can occur.

See Also:
Constant Field Values

ISOLATION_SERIALIZABLE

public static final String ISOLATION_SERIALIZABLE
Used as the value for the TRANSACTION_ISOLATION setting. Configures the transaction isolation level to have a serializable support for transactions. Dirty reads, non-repeatable reads and phantom reads are prevented.

See Also:
Constant Field Values

ISOLATION_BATCH_INSERT

public static final String ISOLATION_BATCH_INSERT
Deprecated. Use LUCENE transaction isolation instead, defaults to it
See Also:
Constant Field Values

ISOLATION_LUCENE

public static final String ISOLATION_LUCENE
Used as the value for the TRANSACTION_ISOLATION setting. Configures the transaction isolation level to have a lucene isolation level allowing for fast Create/Update/Delete operations whild read/search operations won't "see" the operations done during the transaction.

See Also:
Constant Field Values

DISABLE_AUTO_JOIN_SESSION

public static final String DISABLE_AUTO_JOIN_SESSION
When opening a session, Compass tries to automatically start a transaction and join it. This might mean that transaction settings when running within a managed environemnt won't take affect. The settings allows to disable the auto joining of a session to a transaction.

See Also:
Constant Field Values

DISABLE_THREAD_BOUND_LOCAL_TRANSATION

public static final String DISABLE_THREAD_BOUND_LOCAL_TRANSATION
This settings allows to disable the default behaviour of the Local transaction factory to bind the session / transaction to the local thread. This means that each call to beginTransaction will create a new transaction and not join one if one is already in progress within the thread.

See Also:
Constant Field Values

TRANSACTION_TIMEOUT

public static final String TRANSACTION_TIMEOUT
Configures the transaction timeout (JTA or Spring). The defualt is -1 which does not set the timout and uses the default one configured for the transaction manager.

See Also:
Constant Field Values
Constructor Detail

CompassEnvironment.Transaction

public CompassEnvironment.Transaction()


Copyright (c) 2004-2008 The Compass Project.