org.apache.camel.component.jpa
Class JpaTemplateTransactionStrategy

java.lang.Object
  extended by org.apache.camel.component.jpa.JpaTemplateTransactionStrategy
All Implemented Interfaces:
TransactionStrategy

public class JpaTemplateTransactionStrategy
extends Object
implements TransactionStrategy

Delegates the strategy to the JpaTemplate and TransactionTemplate for transaction handling

Version:

Constructor Summary
JpaTemplateTransactionStrategy(org.springframework.orm.jpa.JpaTemplate jpaTemplate, org.springframework.transaction.support.TransactionTemplate transactionTemplate)
           
 
Method Summary
 Object execute(org.springframework.orm.jpa.JpaCallback<?> callback)
          Executes in a transaction.
static JpaTemplateTransactionStrategy newInstance(javax.persistence.EntityManagerFactory emf)
          Creates a new implementation from the given JPA factory
static JpaTemplateTransactionStrategy newInstance(javax.persistence.EntityManagerFactory emf, org.springframework.orm.jpa.JpaTemplate template)
          Creates a new implementation from the given JPA factory and JPA template
static JpaTemplateTransactionStrategy newInstance(org.springframework.transaction.PlatformTransactionManager transactionManager, org.springframework.orm.jpa.JpaTemplate template)
          Creates a new implementation from the given Transaction Manager and JPA template
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpaTemplateTransactionStrategy

public JpaTemplateTransactionStrategy(org.springframework.orm.jpa.JpaTemplate jpaTemplate,
                                      org.springframework.transaction.support.TransactionTemplate transactionTemplate)
Method Detail

newInstance

public static JpaTemplateTransactionStrategy newInstance(javax.persistence.EntityManagerFactory emf)
Creates a new implementation from the given JPA factory


newInstance

public static JpaTemplateTransactionStrategy newInstance(javax.persistence.EntityManagerFactory emf,
                                                         org.springframework.orm.jpa.JpaTemplate template)
Creates a new implementation from the given JPA factory and JPA template


newInstance

public static JpaTemplateTransactionStrategy newInstance(org.springframework.transaction.PlatformTransactionManager transactionManager,
                                                         org.springframework.orm.jpa.JpaTemplate template)
Creates a new implementation from the given Transaction Manager and JPA template


execute

public Object execute(org.springframework.orm.jpa.JpaCallback<?> callback)
Description copied from interface: TransactionStrategy
Executes in a transaction.

Specified by:
execute in interface TransactionStrategy
Parameters:
callback - the callback
Returns:
the result


Apache CAMEL