You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2021/07/01 12:59:18 UTC

Re: Autowire DataSource into SqlEndpoint since 3.11

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 <be...@gmx.net> 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 <be...@gmx.net> 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

Aw: Re: Autowire DataSource into SqlEndpoint since 3.11

Posted by Benjamin Graf <Be...@gmx.net>.
Hi Claus,
 
great to hear. Any chance to get this into 3.11.x as well?

Regards
Benjamin 

Gesendet: Donnerstag, 01. Juli 2021 um 14:59 Uhr
Von: "Claus Ibsen" <cl...@gmail.com>
An: "dev" <de...@camel.apache.org>
Betreff: Re: Autowire DataSource into SqlEndpoint since 3.11
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 <be...@gmx.net> 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[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 <be...@gmx.net> 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[http://davsclaus.com] @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2[https://www.manning.com/ibsen2]