We've got a Spring 3.1 web-application using spring-aop with cglib library.
spring.xml:
That means that a proxy will be created using cglib for every bean.Code:<context:annotation-config/> <aop:aspectj-autoproxy proxy-target-class="true"/>
Now we need to use a db connection pool bean with com.mchange.v2.c3p0.ComboPooledDataSource:
The problem is the ComboPooledDataSource class is marked as final. And cglib can't proxy final classes.Code:<bean id="connectionPool" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <!-- here are some properties --> </bean>
How to mark "connectionPool" bean not to be proxied?


Reply With Quote
