Leo Breuss created CAMEL-20042: ---------------------------------- Summary: camel-sql, use primary spring data source by default Key: CAMEL-20042 URL: https://issues.apache.org/jira/browse/CAMEL-20042 Project: Camel Issue Type: Improvement Components: camel-sql Affects Versions: 3.18.8 Reporter: Leo Breuss
Improvement suggestion: If there are more than one datasource available, the method shall return the primary datasource, or none if there is no primary datasource. DefaultAutowiredLifecycleStrategy#autwire() does not return any datasource from the spring context if there are more than one datasource in the spring context. This improvement will mitigate the following inconvenience: When adding a second datasource, e.g. by external XML spring bean configuration, the existing SQL endpoints not having a datasource parameter stopped using the default spring datasource and failed at runtime. This problem was very hard to come by, as there is no obvious reason or message, why the former datasource still present in the context is no longer used. Defining the main spring.datasource as @Primary did not resolve the problem. -- This message was sent by Atlassian Jira (v8.20.10#820010)