Announcement Announcement Module
Collapse
No announcement yet.
ProxyFactoryBean & aop:config Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ProxyFactoryBean & aop:config

    I have read in this forum that you cannot mix ProxyFactoryBean and aop:config in your server context. Since I'm using a ProxyFactoryBean with CommonsPoolTargetSource in my app, I experienced this conflict first hand when I try to add some logging to my app using an AspectJ annotated class and aop:config. I was able to get my logger working by throwing away the AOP and making it a MethodInterceptor, proxying the beans I wanted to add logging to.

    The down side to this is there is a lot more configuration overhead when I want to add additional logging to the application. I'd really like to be able to use an AspectJ annotated class to handle this cross cutting concern.

    Is there a way I can have an AspectJ annotated class in my app and still use the built in spring AOP classes to handle pooling? Perhaps there is a way to set up the pooling without using a ProxyFactoryBean?

  • #2
    Ok, so I've been playing with this some more and have found that mixing aop:auto-proxy and ProxyFactoryBeans for the pooling is not the cause of my issues. One of the libraries I'm using (wurfl.sf.net) starts throwing NullPointerExceptions when the AOP proxy is added to the context.

    I'll see if I can figure this out why this is.

    Comment

    Working...
    X