This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Use in DAO in hibernate CallBack such as PreRemove  RSS feed

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand that the entity manager is fragile state during the call back listner stage.

So i wonder what can i do if i want to save an object during PreRemove event.

Now , i obtain my DAO in this step and use it and it work , but as i said above i understood that this is not a good practice

I work with Ejb3 (Jboss 4.2 , JPA)

Thank you
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!