Thanks for the quick reply Matt, as usual u r da man.

I'll look into both of your suggestions!

Bob


mraible wrote:
> 
> If you're using Hibernate, you can probably use its Event Listeners to
> listen for onSave changes:
> http://www.hibernate.org/hib_docs/reference/en/html/events.html
> 
> Using interceptors is probably more appropriate:
> 
> http://hibernate.javabeat.net/articles/2007/05/interceptors-in-hibernate-introduction/
> 
> Both can be configured on your sessionFactory bean.
> 
> Matt
> 
> On 7/11/07, syg6 <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hello,
>>
>> I am playing around with AOP and have a simply Advice class being called
>> when I call the save() method of a certain Dao, using an Advisor I have
>> defined in my applicationContext.xml. I want to expand this so it is
>> called
>> when the save() method of ANY Dao is called. I know I have to use
>> AutoProxying. (or create a bean for every class ...)
>>
>> What I eventually want to do is change the Advice class so it updates a
>> couple of fields - userId and date - in the table that corresponds to the
>> Object that is being saved. These fields will never be input from a form,
>> they are for internal change-tracking and are the same for EVERY table,
>> hence my interest in using AOP.
>>
>> Sounds tricky to me ... I'm not sure how to go about it because although
>> the
>> field names are always the same, the class (and thus table name) will be
>> different. I know that all classes that implement the PointCut interface
>> have access to the class ... and since I am using a Spring
>> PointCutAdvisor,
>> I have access to the PointCut ... I am just getting lost in the details
>> is
>> all, not sure how to put it all together ...
>>
>> Any AOP experts out there ever done anything like this before?
>>
>> Many thanks,
>> Bob
>> --
>> View this message in context: http://www.nabble.com/AOP
>> -Question-%3A-Make-all-Objects-update-a-field-in-their-table
>> -on-save%28%29-tf4062059s2369.html#a11540766
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> http://raibledesigns.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AOP-Question-%3A-Make-all-Objects-update-a-field-in-their-table-on-save%28%29-tf4062059s2369.html#a11541081
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to