-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Added support for data source proxying. #8753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for data source proxying. #8753
Conversation
… flexy-pool or custom proxy.
Thanks for the PR. Unfortunately I think that there might be a few problems with the approach. The first is that the existing datasource beans that get exposed are bound to The second problem is that the I'm not sure on the best way to fix these issue. Perhaps we can use a |
I've started sketching something along those lines a few weeks ago but didn't have time to round it off into a PR. My approach was to introduce |
Thanks for the answer, @philwebb, @vpavic. @philwebb I tried to minimize breaking changes so my proposal is based on two conclusions:
@vpavic good point about |
are you talking about this part?
In my case this will be executed if you use one of "default" proxies. |
@gavlyukovskiy See |
I tried it again and now I see, very sorry for that dumb comments. Actually I thought that I'll try to use |
… datasource proxy and flexy pool
e86c4d2
to
1db9dff
Compare
I have changed the code to use decorators instead of direct proxy types. Also I'm using |
Thanks for the PR and thanks, too, for the library that you've split out. Given that you're maintaining the library regularly and that it's included in our third-party starter list, I think that's the best place for this code now. If you disagree, please comment and we can reconsider. |
Autoconfigured to indicate p6spy, datasource-proxy, flexy-pool by default and wrap autoconfigured data source.
Supported to define custom data source proxy or change order of proxying if multimple libraries found using
spring.datasource.proxyType
, disables proxying if empty.Added ProxyDataSourcePoolMetadataProvider to get metrics from the real data source.
Fixes #7863.