Announcement Announcement Module
Collapse
No announcement yet.
JPA Tx Flushed when Delegating to Hibernate Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JPA Tx Flushed when Delegating to Hibernate

    I have an tx boundary method in a typical service which calls a dao to load an entity.

    The loading of the entity has to delegate to the underlying JPA implementation because of the filter feature not being in JPA.

    The problem is when delegating to the underlying implementation, after the finder the session is flushed and the changes seem to be committed.

    The default flush mode is AUTO - do I need to move to a manual flush mode or is this a problem with spring jpa support?

    Code:
    public Object doInJpa(EntityManager em) throws PersistenceException  {		
      Session session = (Session)em.getDelegate();	
      Filter filter = session.enableFilter("limitByStatus");				
      .
      .
    });
    Operations which do not delegate to the underlying do not flush as expected.
    Last edited by jamesclinton; Aug 17th, 2007, 03:20 AM.

  • #2
    Resolved

    Symptom but not cause!!

    Problem was due to (i think) incorrect transaction settings on tx boundary operation!.

    Comment

    Working...
    X