-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: audit log - temporary session
PostPosted: Tue May 05, 2009 10:23 am 
Beginner
Beginner

Joined: Tue Nov 06, 2007 5:13 am
Posts: 28
I am talking about

  • Listing 12.1 on page 549 and
  • Listing 12.2 on page 552
of "Java Persistence with Hibernate"

why is a new separate session opened for each audit log record (in AuditLog.logEvent())?

wouldn't it be better to open/flush/close the temporary session in the postFlush() function of the interceptor and pass this temporary session to the AuditLog.logEvent() function?

BTW: how could we do the same with JPA?
I mean: instead of a temporary session: create a temporary EntityManager?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.