Skip to content

Filter any AbstractRoutingDataSource from dbHealthIndicator #6806

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

Closed
philwebb opened this issue Sep 1, 2016 · 4 comments
Closed

Filter any AbstractRoutingDataSource from dbHealthIndicator #6806

philwebb opened this issue Sep 1, 2016 · 4 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

philwebb commented Sep 1, 2016

The current dbHealthIndicator currently includes all DataSource beans, however, AbstractRoutingDataSource almost never needed directly. By default we should probably filter it out.

@philwebb philwebb added this to the 1.5.0 milestone Sep 1, 2016
@philwebb philwebb modified the milestones: 1.5.0 M1, 1.5.0 Dec 20, 2016
@snicoll snicoll self-assigned this Dec 27, 2016
@snicoll snicoll added the type: enhancement A general enhancement label Dec 27, 2016
snicoll added a commit that referenced this issue Dec 27, 2016
Since the `JestClient` is auto-configured as a bean, it must have its
multi-threaded support enabled by default. This commit exposes a new
`spring.elasticsearch.jest.multi-threaded` property that is `true` by
default.

Closes gh-6806
@natetyler
Copy link

@philwebb I'm putting multiple datasources behind an AbstractRoutingDataSource, but they are not registered as beans because they are instantiated dynamically at run time. Does actuator have any "out of the box" way to handle this scenario?

@vpavic
Copy link
Contributor

vpavic commented Apr 13, 2017

@natetyler There is an existing PR to provide functionality that will allow you to register HealthIndicators in runtime - take a look at #4894 and #4965.

@snicoll
Copy link
Member

snicoll commented Apr 13, 2017

@natetyler how about exposing your own HealthIndicator that uses your AbstractRoutingDataSource and provides the desired feature? DataSourceHealthIndicator is public API so you could create an instance for each of your data source and combine the results yourself (CompositeHealthIndicator can help with that).

@natetyler
Copy link

@vpavic @snicoll Thanks for the prompt replies. I ended up going with CompositeHealthIndicator grouping multiple DataSourceHealthIndicator and it's perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants