|
From: Kopylenko, D. <dko...@ac...> - 2004-01-05 14:07:14
|
John, it's in the works right now... Regards, Dmitriy. -----Original Message----- From: John K.Watson [mailto:jo...@sl...] Sent: Monday, January 05, 2004 9:05 AM To: spr...@li... Subject: Re: [Springframework-developer] Method Interception By Name What would improve usability in this area would be the chapter on AOP in the docs which hasn't been written yet. I spent about a day poring through the source and the tests to find some examples of how to make all this work. It's definitely non-obvious at the moment. Some of the class names are really quite hideous, also. That all being said, it seemed to work as advertised once I understood what was going on. :) John On Jan 5, 2004, at 1:15 AM, Rod Johnson wrote: > Ross > > You're on the right track. There is actually a RegExpPointcut, which > should > enable you to move the matching rule into XML. Please feedback any > comments > about its usability, as we may try to improve it for 1.0 final. > > In general, the interceptor should not do matching, unless the > matching is > relevant to it's work (e.g. it behaves differently for methods > starting with > some prefix, returning void, or whatever). Even in that case, it might > be > better to use several simpler interceptors with corresponding > pointcuts to > facilitate reuse. > > Regards, > Rod > > ----- Original Message ----- > From: "Ross Mason" <ro...@at...> > To: <spr...@li...> > Sent: Monday, January 05, 2004 6:33 AM > Subject: Re: [Springframework-developer] Method Interception By Name > > >> Hi Matthew, >> >> I think you can create an Advisor such as >> DefaultInterceptionAroundAdvisor add your MethodInterceptor as a ref >> and >> also define a PointCut. The PointCut is a composition of a >> MethodMatcher >> and ClassFilter. Your MethodMatcher implementation could accept, say a >> regex (which can be configured in the applicationContext.xml) to >> filter >> the correct methods. >> >> I haven't really played with the aop stuff so I may be off the mark, >> but >> sounds sensible to me... ;-) >> >> Cheers, >> >> Ross >> >> btw Happy new year! >> >> Matthew E. Porter wrote: >> >>> I have written a class implementing MethodInterceptor. Currently, >>> the >>> class checks the method name to decide whether or not to apply the >>> interceptor logic. I am curious if there is a better way to do this >>> in >>> Spring. It would be nice if there was a way to specify the method >>> names >>> in the applicationContext.xml. >>> >>> All help/advice is appreciated! >>> >>> >>> Cheers, >>> matthew >>> >>> >>> >>> ------------------------------------------------------- >>> 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 >>> >> >> >> ------------------------------------------------------- >> 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 >> > > > > > ------------------------------------------------------- > 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 ------------------------------------------------------- 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 |