Method javax.persistence.EntityManager void joinTransaction() Indicate to the entity manager that a JTA transaction is active. This method should be called on a JTA application managed entity manager that was created outside the scope of the active transaction to associate it with the current JTA

Method javax.persistence.EntityManager void lock( Object entity, LockModeType lockMode ) Lock an entity instance that is contained in the persistence context with the specified lock mode type. If a pessimistic lock mode type is specified and the entity contains a version attribute

Method javax.persistence.EntityManager T merge( T entity ) Merge the state of the given entity into the current persistence context. Parameters: entity - entity instance Returns: the managed instance that the state was merged to Throws: IllegalArgumentException - if instance is not an entity or

Method javax.persistence.EntityManager void refresh( Object entity ) Refresh the state of the instance from the database, overwriting changes made to the entity, if any. Parameters: entity - entity instance Throws: IllegalArgumentException - if the instance is not an entity or the entity is not

Method javax.persistence.EntityManager void refresh( Object entity, Map properties ) Refresh the state of the instance from the database, using the specified properties, and overwriting changes made to the entity, if any. If a vendor-specific property or hint is not recognized