java - Rollback not working for entity with children (JPA) -


i have next application configuration: karaf 2.3.1; hibernate jpa-2.0 1.0.1.final; hibernate - 4.2.7.final; postgress 9.2.

i have 1 proven case when changes in db not remove after transaction roll-backed.

case specific , rollback works fine other cases in environment.

problematic case is:

mapped entities: has b child. b has c child;

  • new entity , it’s new child b , it’s new child c prepared;
  • new entity persisted 1 getentitymanager().persist(a) command. during actin 3 related tables populated.
  • after db operation within scope of same container managed transaction code throws exception.
  • newly 3 created records in db. wrong!

according log transaction roll-backed

| clearing entitymanager org.apache.aries.jpa.container.impl.entitymanagerwrapper@5c660d79 transaction has completed. | closing session | closing jdbc container [org.hibernate.engine.jdbc.internal.jdbccoordinatorimpl@7860eaa7] | hhh000420: closing un-released batch | closing logical connection | logical connection closed | jta sync : aftercompletion(4) | transaction aftercompletion callback [status=4] | session closed; nothing | after transaction completion | aggressively releasing jdbc connection | after transaction completion 

any ideas or suggestions welcome.

thanks in advance.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -