Using custom prepareStatementStrategy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using custom prepareStatementStrategy

bukaj_s
Hello.
How can one plug in his own implementation of prepareStatementStrategy?
Using prepareStatementStrategy=com.example.CustomStrategy is not working
for me.
Thanks
Best regards
Bukaj
Reply | Threaded
Open this post in threaded view
|

Re: Using custom prepareStatementStrategy

Claus Ibsen-2
Hi

Use # syntax, see for example the unit test class
SqlProducerAlwaysPopulateStatementTest

On Sun, Jul 1, 2018 at 3:51 PM, bukaj_s <[hidden email]> wrote:
> Hello.
> How can one plug in his own implementation of prepareStatementStrategy?
> Using prepareStatementStrategy=com.example.CustomStrategy is not working
> for me.
> Thanks
> Best regards
> Bukaj



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Reply | Threaded
Open this post in threaded view
|

Re: Using custom prepareStatementStrategy

bukaj_s
I must be doing something wrong.

&prepareStatementStrategy=%23strategia due to: Could not find a suitable
setter for property: prepareStatementStrategy as there isn't a setter
method with same type: java.lang.String nor type conversion possible: No
type converter available to convert from type: java.lang.String to the
required type: org.apache.camel.component.sql.SqlPrepareStatementStrategy
with value #strategia

2018-07-03 12:44 GMT+02:00 Claus Ibsen <[hidden email]>:

> Hi
>
> Use # syntax, see for example the unit test class
> SqlProducerAlwaysPopulateStatementTest
>
> On Sun, Jul 1, 2018 at 3:51 PM, bukaj_s <[hidden email]> wrote:
> > Hello.
> > How can one plug in his own implementation of prepareStatementStrategy?
> > Using prepareStatementStrategy=com.example.CustomStrategy is not working
> > for me.
> > Thanks
> > Best regards
> > Bukaj
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
Reply | Threaded
Open this post in threaded view
|

Re: Using custom prepareStatementStrategy

Claus Ibsen-2
Hi

Try with newer Camel version.
And make sure that your custom strategy is a bean with that id and its
in the bean registry.

On Sat, Jul 14, 2018 at 10:35 PM, bukaj_s <[hidden email]> wrote:

> I must be doing something wrong.
>
> &prepareStatementStrategy=%23strategia due to: Could not find a suitable
> setter for property: prepareStatementStrategy as there isn't a setter
> method with same type: java.lang.String nor type conversion possible: No
> type converter available to convert from type: java.lang.String to the
> required type: org.apache.camel.component.sql.SqlPrepareStatementStrategy
> with value #strategia
>
> 2018-07-03 12:44 GMT+02:00 Claus Ibsen <[hidden email]>:
>
>> Hi
>>
>> Use # syntax, see for example the unit test class
>> SqlProducerAlwaysPopulateStatementTest
>>
>> On Sun, Jul 1, 2018 at 3:51 PM, bukaj_s <[hidden email]> wrote:
>> > Hello.
>> > How can one plug in his own implementation of prepareStatementStrategy?
>> > Using prepareStatementStrategy=com.example.CustomStrategy is not working
>> > for me.
>> > Thanks
>> > Best regards
>> > Bukaj
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> http://davsclaus.com @davsclaus
>> Camel in Action 2: https://www.manning.com/ibsen2
>>



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2