i'm setting up a web server with Spring 3.0.5, and i'm having issues trying to declare an aspect on a DAO interface.
My DAO object hierarchy (described in attached picture dao_object_model.png) defines a template DAO base interface IBaseDAO<T>, implemented by a template DAO base abstract class: BaseDao<T> which implements a base version of all the IBaseDAO methods, including saveOrUpdate(T) amongst others.
For each business object class, i create a specialization of the IBaseDAO<T>, and i create a DAO class that both implements that specialized interface and extends the base abstract DAO class BaseDAO<T>.
For instance, for the Comment BO, i define the CommentDAO class (no method redefinition), that implements ICommentDAO (this interface has no method) and extends IBaseDAO<T>.
I'd like to create an aspect that triggers when the method saveOrUpdate() is called on class CommentDAO. For that i define the following aspect:
This aspect never triggers. The only workaround I found is to declare an aspect on every call to saveOrUpdate(), whatever the class:
It seems like Spring AOP doesn't recognize saveOrUpdate(..) as a method of the ICommentDAO interface.
I can't figure out what i'm missing here...