Issue Details (XML | Word | Printable)

Key: MOD-217
Type: Improvement Improvement
Status: In Progress In Progress
Priority: Major Major
Assignee: Omar Irbouh
Reporter: Damir Murat
Votes: 5
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Spring Modules

AbstractCachingInterceptor should be much more extensible

Created: 28/Aug/06 03:31 PM   Updated: 09/Jul/09 05:22 AM
Component/s: CACHE
Affects Version/s: 0.5
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Spring 1.2.7, jdk 1.4.2_12
Issue Links:
Related
 


 Description  « Hide
I'm trying to extend AbstractModelSourceCachingInterceptor for my own specific caching purposes but I find it almost impossible. Problem is in AbstractCachingInterceptor which have final setters and no getters for all properties. In such situation subclasses can not access configured properties like i.e. cacheProviderFacade (to which I need access in my extended interceptor). Further, afterProprtiesSet method is also final and does not provide i.e. beforeAfterPropertiesSet hook which extended classes can invoke before initialization of cache models take place.

So, my need and suggestion is to introduce at least protected getters for all properties, and beforeAfterPropertiesSet hook in AbstractCachingInterceptor class. This features should not brake anything, and if you look at AbstractModelSourceCachingInterceptor class you can find getter for cachingModelSource property. It seams to me that such getters must also be available in AbstractCachingInterceptor if that class is intended to be truly extensible.

Regards,
Damir Murat

Costin Leau made changes - 14/Sep/06 03:41 AM
Field Original Value New Value
Assignee Costin Leau [ costin ] Omar Irbouh [ irbouho ]
Omar Irbouh made changes - 08/Jul/07 11:06 PM
Status Open [ 1 ] In Progress [ 3 ]
Colin Yates added a comment - 01/Feb/08 09:16 AM
This sounds like a good programming practice which could be applied to the whole code base really.

Omar, do you have any plans to do this?

Colin Yates made changes - 01/Feb/08 09:32 AM
Link This issue is related to MOD-394 [ MOD-394 ]
Antony Stubbs added a comment - 10/Jun/09 05:59 PM
I really don't understand the obsession with final methods. who cares if a user wants to override them - override at your own risk!

Antony Stubbs added a comment - 10/Jun/09 06:33 PM
yes - pain in the a**
cachedValueFromSource is private and invoke is final! :/


Antony Stubbs added a comment - 09/Jul/09 05:22 AM
FYI this has been partially addressed in the first snapshot of 0.10. More info, with download (maven) instructions on the site:
" @psynikal: Finally! After over a year of waiting, a SNAPSHOT version of 0.10! More info on the site: http://bit.ly/4iXjM "