|
From: Rod J. <rod...@in...> - 2003-12-10 22:24:26
|
Alef I'd really need to see the code (maybe send it to me directly). I'm not quite sure what this code is trying to do, but I'm almost positive there's a better way :-) It looks as though it's trying to invent its own pointcut model, instead of using the framework's. Is it putting custom behaviour in the InvokerInterceptor? The replacement would be to set the target to the target object (you don't normally need to use a TargetSource unless you want to do something fancy, so this is just standard framework usage) and put the interception behaviour in an interceptor that's distinct from the invocation of the target. If some invocations need to go to an object other than the ultimate target, any interceptor can do that. It just returns the result of reflective method invocation on _its_ target, rather than invoking proceed(). Regards, Rod ----- Original Message ----- From: "Alef Arendsen" <al...@jt...> To: <spr...@li...> Sent: Wednesday, December 10, 2003 9:42 PM Subject: [Springframework-developer] InvokerInterceptor --> ?? > Rod, > > I saw the InvokerInterceptor has been removed about two weeks ago. We > used to use that to do method interceptions. I saw it was replaced by > the TargetSource. My colleague asked me what replaced it. Since I am > supposed to be the Spring expert here, but actually don't know anything > about the AOP stuff :), you give me a hint how to do the method > interceptions right now? We used to have something like this: > > <bean id="WorkflowInterceptor" > class="icatch.workflow.interceptor.WorkflowInterceptor" // > extending InvokerInterceptor > init-method="init"> > <!-- set the workflow manager to handle all method interceptions > --> > <property name="workflowManager"> > <ref bean="WorkflowManager"/> > </property> > <!-- the definition of all methods that should be intercepted > --> > <property name="interceptedMethods"> > <props> > <prop key="load"></prop> > <prop key="create"></prop> > <prop key="update"></prop> > <prop key="remove"></prop> > <prop key="findAll"></prop> > <prop key="findBy"></prop> > <prop key="isUnique"></prop> > <prop key="executeBusinessLogic"></prop> > </props> > </property> > </bean> > > Thanx, > > Alef > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |