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
|