Only one pointcut used in service layer. @Pointcut("@annotation(LogAsTextFile)") public void traceAsTextLogs() { }
*** Aspect class : @Before("flow.aspect.PointcutsAspect.traceAsTextLogs()") public void logBefore(JoinPoint joinPoint) { .... } I use LogAsTextFile annotation for some of the methods in the service class. On the other hand, I use service class in the components with @SpringBean annotatiion. Until I started trying AOP, there weren't any problems about serialization. On Tue, May 31, 2011 at 2:55 PM, James Carman <ja...@carmanconsulting.com>wrote: > What pointcuts are you using? You're trying to inject logic into your > pages/components? > > 2011/5/31 İzlem Gözükeleş <izl...@gmail.com>: > > Hi, > > I wanted to use Spring AOP (3.0.5) with wicket (1.4.16). However, I got > > java.io.NotSerializableException: > > > org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl > > > > My spring file contains the lines, > > > > <aop:aspectj-autoproxy /> > > > > <bean id="flowAppLogger" class="flow.aspect.LogAspect"> > > <property name="logService" ref="flowLog"/> > > </bean> > > > > <bean id="flowLog" class="flow.aspect.FlowLog" /> > > > > My flowAppLogger works, it wrote to file. Yet, I got exceptions because > > of Serialization. > > I know and use @SpringBean for other beans. But, how can I use > @SpringBean > > annotation for aspect oriented programming in wicket? > > Or use AOP in another way? > > > > thanks > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >