huangxfchn commented on issue #15086:
URL:
https://github.com/apache/shardingsphere/issues/15086#issuecomment-1066073345
@terrymanu
Hi~,Brother Liang. My project also uses open-tracing for jdbc, it will proxy
the getConnection method of javax.sql.DataSource, and spring 2.x uses cglib
proxy by default, but ShardingSphereDataSource is a final class. So, if the
DataSource is proxied, this exception will occur. The similar code like this:
```
@Aspect
public class JdbcAspect {
@Around("execution(java.sql.Connection *.getConnection(..)) &&
target(javax.sql.DataSource)")
public Object getConnection(final ProceedingJoinPoint pjp) throws
Throwable {
return new TracingConnection(conn);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]