org.compass.gps.device.jpa
Class JtaEntityManagerWrapper

java.lang.Object
  extended by org.compass.gps.device.jpa.AbstractEntityManagerWrapper
      extended by org.compass.gps.device.jpa.JtaEntityManagerWrapper
All Implemented Interfaces:
EntityManagerWrapper

public class JtaEntityManagerWrapper
extends AbstractEntityManagerWrapper

A JTA only EntityManagerWrapper. Works only with JPA code that exists within a JTA transaction.

Author:
kimchy

Field Summary
 
Fields inherited from class org.compass.gps.device.jpa.AbstractEntityManagerWrapper
entityManager, entityManagerFactory, log
 
Constructor Summary
JtaEntityManagerWrapper()
           
 
Method Summary
protected  void beginTransaction()
           
protected  void commitTransaction()
           
protected  void rollbackTransaction()
           
protected  boolean shouldCloseEntityManager()
           
 
Methods inherited from class org.compass.gps.device.jpa.AbstractEntityManagerWrapper
close, closeOnError, doCreateEntityManager, getEntityManager, newInstance, open, setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JtaEntityManagerWrapper

public JtaEntityManagerWrapper()
Method Detail

beginTransaction

protected void beginTransaction()
                         throws javax.persistence.PersistenceException
Specified by:
beginTransaction in class AbstractEntityManagerWrapper
Throws:
javax.persistence.PersistenceException

commitTransaction

protected void commitTransaction()
                          throws javax.persistence.PersistenceException
Specified by:
commitTransaction in class AbstractEntityManagerWrapper
Throws:
javax.persistence.PersistenceException

rollbackTransaction

protected void rollbackTransaction()
                            throws javax.persistence.PersistenceException
Specified by:
rollbackTransaction in class AbstractEntityManagerWrapper
Throws:
javax.persistence.PersistenceException

shouldCloseEntityManager

protected boolean shouldCloseEntityManager()
Specified by:
shouldCloseEntityManager in class AbstractEntityManagerWrapper


Copyright (c) 2004-2009 The Compass Project.