Home » openejb-3.1.2-src » org.apache » openejb » persistence » [javadoc | source]
org.apache.openejb.persistence
public class: JtaEntityManager [javadoc | source]
java.lang.Object
   org.apache.openejb.persistence.JtaEntityManager

All Implemented Interfaces:
    javax.persistence.EntityManager

The JtaEntityManager is a wrapper around an entity manager that automatically creates and closes entity managers for each transaction in which it is accessed. This implementation supports both transaction and extended scoped JTA entity managers.

It is important that extended scoped entity managers add entity managers to the JtaEntityManagerRegistry when the component is entered and remove them when exited. If this registration is not preformed, an IllegalStateException will be thrown when entity manger is used. It is important that a component adds extended scoped entity managers to the JtaEntityManagerRegistry when the component is entered and removes them when exited. If this registration is not preformed, an IllegalStateException will be thrown when entity manger is accessed.
Constructor:
 public JtaEntityManager(JtaEntityManagerRegistry registry,
    EntityManagerFactory entityManagerFactory,
    Map properties) 
 public JtaEntityManager(JtaEntityManagerRegistry registry,
    EntityManagerFactory entityManagerFactory,
    Map properties,
    boolean extended) 
Method from org.apache.openejb.persistence.JtaEntityManager Summary:
clear,   close,   contains,   createNamedQuery,   createNativeQuery,   createNativeQuery,   createNativeQuery,   createQuery,   find,   flush,   getDelegate,   getFlushMode,   getReference,   getTransaction,   isOpen,   joinTransaction,   lock,   merge,   persist,   refresh,   remove,   setFlushMode
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openejb.persistence.JtaEntityManager Detail:
 public  void clear() 
 public  void close() 
 public boolean contains(Object entity) 
 public Query createNamedQuery(String name) 
 public Query createNativeQuery(String sqlString) 
 public Query createNativeQuery(String sqlString,
    Class resultClass) 
 public Query createNativeQuery(String sqlString,
    String resultSetMapping) 
 public Query createQuery(String qlString) 
 public T find(Class<T> entityClass,
    Object primaryKey) 
 public  void flush() 
 public EntityManager getDelegate() 
 public FlushModeType getFlushMode() 
 public T getReference(Class<T> entityClass,
    Object primaryKey) 
 public EntityTransaction getTransaction() 
 public boolean isOpen() 
 public  void joinTransaction() 
 public  void lock(Object entity,
    LockModeType lockMode) 
 public T merge(T entity) 
 public  void persist(Object entity) 
 public  void refresh(Object entity) 
 public  void remove(Object entity) 
 public  void setFlushMode(FlushModeType flushMode)