com.wideplay.warp.persist
Enum TransactionStrategy

java.lang.Object
  extended by java.lang.Enum<TransactionStrategy>
      extended by com.wideplay.warp.persist.TransactionStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TransactionStrategy>

public enum TransactionStrategy
extends java.lang.Enum<TransactionStrategy>

Created by IntelliJ IDEA. User: Dhanji R. Prasanna (dhanji@gmail.com) Date: 31/05/2007 Time: 11:58:15

Enumerates various txn strategies supported by warp-ext.

Since:
1.0
Author:
Dhanji R. Prasanna (dhanji@gmail.com)

Enum Constant Summary
JTA
          Used to configure JTA as the transaction strategy for this app.
LOCAL
          Used to configure resource-local transactions.
 
Method Summary
static TransactionStrategy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TransactionStrategy[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

JTA

public static final TransactionStrategy JTA
Used to configure JTA as the transaction strategy for this app. UserTransactions will be looked up via JNDI and joined or created as necessary. All transactions are assumed to be in isolation level "REQUIRES". JTA support is currently not available


LOCAL

public static final TransactionStrategy LOCAL
Used to configure resource-local transactions. This is the default (and best) way to use warp-persist. Transaction isolation level emulates the "REQUIRES" semantic. See website documentation for details. If using JTA you must remember to set the transaction type as RESOURCE_LOCAL

Method Detail

values

public static final TransactionStrategy[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(TransactionStrategy c : TransactionStrategy.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static TransactionStrategy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name