Class EntityManagerHolder

All Implemented Interfaces:
ResourceHolder
Direct Known Subclasses:
SessionHolder

public class EntityManagerHolder extends ResourceHolderSupport
Resource holder wrapping a JPA EntityManager. JpaTransactionManager binds instances of this class to the thread, for a given EntityManagerFactory.

Also serves as a base class for SessionHolder, as of 5.1.

Note: This is an SPI class, not intended to be used by applications.

Since:
2.0
Author:
Juergen Hoeller
See Also:
  • Constructor Details

  • Method Details

    • getEntityManager

      public EntityManager getEntityManager()
    • setTransactionActive

      protected void setTransactionActive(boolean transactionActive)
    • isTransactionActive

      protected boolean isTransactionActive()
    • setSavepointManager

      protected void setSavepointManager(@Nullable SavepointManager savepointManager)
    • getSavepointManager

      @Nullable protected SavepointManager getSavepointManager()
    • clear

      public void clear()
      Description copied from class: ResourceHolderSupport
      Clear the transactional state of this resource holder.
      Overrides:
      clear in class ResourceHolderSupport