org.perfectjpattern.jee.integration.dao
Class JtaTransactionStrategy

java.lang.Object
  extended by org.perfectjpattern.jee.integration.dao.JtaTransactionStrategy
All Implemented Interfaces:
IStrategy, ITransactionStrategy

public class JtaTransactionStrategy
extends Object
implements ITransactionStrategy

Concrete implementation of ITransactionStrategy targeting the use of UserTransaction

Version:
$Revision: 1.0 $Date: Feb 19, 2009 1:51:31 PM $
Author:
Giovanni Azua
 

Constructor Summary
JtaTransactionStrategy()
          Constructs a JtaTransactionStrategy using the default UserTransaction service name "java:comp/UserTransaction"
JtaTransactionStrategy(String aServiceName)
          Constructs a JtaTransactionStrategy from the UserTransaction service name provided.
 
Method Summary
 ITransaction getTransaction()
          Returns the adapted JPA implementation-specific Transaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JtaTransactionStrategy

public JtaTransactionStrategy()
Constructs a JtaTransactionStrategy using the default UserTransaction service name "java:comp/UserTransaction"


JtaTransactionStrategy

public JtaTransactionStrategy(String aServiceName)
                       throws IllegalArgumentException
Constructs a JtaTransactionStrategy from the UserTransaction service name provided. It can be server-specific.

Parameters:
aServiceName - The Service name
Throws:
IllegalArgumentException - 'aServiceName' must not be null
Method Detail

getTransaction

public ITransaction getTransaction()
Returns the adapted JPA implementation-specific Transaction

Specified by:
getTransaction in interface ITransactionStrategy
Returns:
adapted JPA implementation-specific Transaction


Copyright © 2007-2009. All Rights Reserved.