public class JpaTemplateTransactionStrategy extends Object implements TransactionStrategy
JpaTemplate and TransactionTemplate for transaction handling| Constructor and Description |
|---|
JpaTemplateTransactionStrategy(org.springframework.orm.jpa.JpaTemplate jpaTemplate,
org.springframework.transaction.support.TransactionTemplate transactionTemplate) |
| Modifier and Type | Method and Description |
|---|---|
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
|
public JpaTemplateTransactionStrategy(org.springframework.orm.jpa.JpaTemplate jpaTemplate,
org.springframework.transaction.support.TransactionTemplate transactionTemplate)
public static JpaTemplateTransactionStrategy newInstance(javax.persistence.EntityManagerFactory emf)
public static JpaTemplateTransactionStrategy newInstance(javax.persistence.EntityManagerFactory emf, org.springframework.orm.jpa.JpaTemplate template)
public static JpaTemplateTransactionStrategy newInstance(org.springframework.transaction.PlatformTransactionManager transactionManager, org.springframework.orm.jpa.JpaTemplate template)
public Object execute(org.springframework.orm.jpa.JpaCallback<?> callback)
TransactionStrategyexecute in interface TransactionStrategycallback - the callbackApache Camel