Hello all,
I don't know where to read about, please give me some hints on the next:
I have bookingManager.createBooking(booking) method. It is called by some controller when user wants to create a booking. Creating a booking is paid procedure, so i'd like to show user confirmation dialog or tell user that he has not enough funds. The thing is that i don't know how many such "paid" methods we are going to have in future and i'd like to get AOP helping me hereI know that Acegi security allows protecting manager methods and somehow redirects user to login form if called controller calls protected method.
If i had this working, i could only add advisors to inject all inner payments logic for other business methods.Code:<aop:config> <aop:advisor id="bannerManagerPayment" advice-ref="methodPaymentInterceptor" pointcut="execution(* com.example.service.banners.BannerManager.createBooking(..))"/> </aop:config> <bean id="methodPaymentInterceptor" class="com.example.aop.MethodPaymentInterceptor"/>
Here is how i expect the processing chain can look like:
Request->some Filter->Controller->bookingManager.createBooking()->AOP interceptor->Not confirmed!->Raise "no confirmation" exception-> and here is the point i can't continue this chain. I quess that raised exception should reach filter and filter should provide required responce. Please hints or just interfaces/classes i should study to solve this puzzle. Thanks!


I know that Acegi security allows protecting manager methods and somehow redirects user to login form if called controller calls protected method.
. I quess that raised exception should reach filter and filter should provide required responce. Please hints or just interfaces/classes i should study to solve this puzzle. Thanks!
Reply With Quote