Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EntityManger and Session in Hibernate

 
Ganesh Choudhary
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want something to execute on openSession and closeSession event of hibernate. When Hibernate API is used to persist the object i am able to do it . I have put aspects around openSession() and closeSession() methods and there i can execute my own logic but when Java Persistence API is used to persist an object i am not able to do it. when we call the close() method on entityManager's object it goes to aspect i have put on session.close() method but it never goes to the aspect put on openSession() event. so what to do ?? Can you people please help me ?

Thanks,
Ganesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic