Hi Ah okay so yeah that is because the injected endpoint is done before the autowiring phase. Its just by chance that the old code in sql component worked for this because it was custom code.
The standard is to have the autowiring via autowired = true I have created a ticket to improve this https://issues.apache.org/jira/browse/CAMEL-16776 On Wed, Jun 30, 2021 at 1:19 PM Benjamin Graf <[email protected]> wrote: > > Hi Clause, > > please try the attached testcase with Camel 3.10 and 3.11 and you'll see > that 3.11 fails for injected Endpoints. This test is for EndpointInject > but it's the same for Produce. Everything is fine if I set the > dataSource attribute to the url. Must be broken because of > https://issues.apache.org/jira/browse/CAMEL-16732 IMHO. > > Regards > > Benjamin > > On 30.06.2021 10:27, Claus Ibsen wrote: > > Hi > > > > Can you tell us more details with some code sample of what you are > > doing and where you think its not longer working as before? > > > > On Tue, Jun 29, 2021 at 7:24 PM Benjamin Graf <[email protected]> wrote: > >> Hi together, > >> > >> can anybody confirm that DataSource autowire does not work anymore for > >> injected Endpoint/Producer since Camel 3.11 release. It seems the new > >> mechanism from core is not used if endpoint is not explicit part of a > >> route definition. > >> > >> Regards > >> > >> Benjamin > >> > >> > > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
