-->
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.  [ 3 posts ] 
Author Message
 Post subject: A simple suggest!
PostPosted: Tue Oct 28, 2003 6:47 am 
Beginner
Beginner

Joined: Tue Oct 28, 2003 6:43 am
Posts: 33
Mybe I'm wrong but I need a functionality and I'm just a biginner with Hibernate (1 day). I need to save the date and the user in every update of a Class with the Lyfecycle interface. No problem with the date but how with the user? I need to bind some property to the session! In this way i could use these to get some user information automatically end for every class.

There are other way?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 28, 2003 7:24 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
You might want to consider the AuditInfo Custom Type pattern: http://www.hibernate.org/48.html


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 29, 2003 4:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I extend the Threadlocal to store a class with the session and the user id, permissions etc that are related to the business transaction. It makes it similar if you like to the HTTPSession object. In this case the information is related to persistence rather Web requests.


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

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.