-->
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.  [ 2 posts ] 
Author Message
 Post subject: ejbActivate counterpart in Hibernate
PostPosted: Tue Apr 05, 2005 10:52 am 
Newbie

Joined: Fri Feb 11, 2005 1:27 pm
Posts: 5
Hi,
I am using Hibernate1.2 +Spring 1.1.3 and I have an business object that I load from the database via a Spring DAO object that uses Hibernate to achieve that.
I want to add additional logic to this business object before making it available for consumption, that is after the object is synchronized with the DB but before is made available by Hibernate (like the ejbActivate concept in EEJBs). Also, but just before Hibernate synchs with DB on commit, I want to add some logic (ejbStore would be the EEJB counterpart again)

I have read about the Interceptor interface and looks like onLoad/onSave are mapping over the concepts I've just explained but the interceptor is a different concept since it is not implemented directly by the entity in question but has to be added as part of initializing a Session and has to be a class in its own right.

Please enlighten me ;)
florin


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 05, 2005 11:27 am 
Newbie

Joined: Fri Feb 11, 2005 1:27 pm
Posts: 5
Got the answer myself: use the Lifecycle interface.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.