org.apache.camel.component.jpa
Class JpaTemplateTransactionStrategy
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.component.jpa.JpaTemplateTransactionStrategy
- All Implemented Interfaces:
- TransactionStrategy, org.apache.camel.Service
public class JpaTemplateTransactionStrategy
- extends org.apache.camel.impl.ServiceSupport
- implements TransactionStrategy
Delegates the strategy to the JpaTemplate
and TransactionTemplate
for transaction handling
- Version:
- $Revision: 563665 $
Constructor Summary |
JpaTemplateTransactionStrategy(org.springframework.orm.jpa.JpaTemplate jpaTemplate,
org.springframework.transaction.support.TransactionTemplate transactionTemplate)
|
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, getThreadName, isStarted, isStopped, isStopping, nextThreadCounter, removeChildService, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.camel.Service |
start, stop |
JpaTemplateTransactionStrategy
public JpaTemplateTransactionStrategy(org.springframework.orm.jpa.JpaTemplate jpaTemplate,
org.springframework.transaction.support.TransactionTemplate transactionTemplate)
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)
execute
public Object execute(org.springframework.orm.jpa.JpaCallback callback)
- Specified by:
execute
in interface TransactionStrategy
doStart
protected void doStart()
throws Exception
- Specified by:
doStart
in class org.apache.camel.impl.ServiceSupport
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Specified by:
doStop
in class org.apache.camel.impl.ServiceSupport
- Throws:
Exception
Copyright © 2007 Apache Software Foundation. All Rights Reserved.