Re: Dynamic datasource with Camel 2.15.x

2015-10-13 Thread burner
.n5.nabble.com/Dynamic-datasource-with-Camel-2-15-x-tp5772178p5772598.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dynamic datasource with Camel 2.15.x

2015-10-06 Thread burner
dataSource.setUsername("XYZ"); dataSource.setUPassword("XYZ"); ?dataSource=#myDataSource -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-datasource-with-Camel-2-15-x-tp5772178p5772328.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dynamic datasource with Camel 2.15.x

2015-10-06 Thread Joakim Bjørnstad
egistry(ApplicationContextRegistry.class); > DataSource dataSource = registry.lookup("dataSource", DataSource.class); > dataSource.setUrl("XYZ"); > dataSource.setUsername("XYZ"); > dataSource.setUPassword("XYZ"); > > ?dataSource=#myD

Re: Dynamic datasource with Camel 2.15.x

2015-10-02 Thread fxthomas
()); never faced any issue yet ?. -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-datasource-with-Camel-2-15-x-tp5772178p5772181.html Sent from the Camel - Users mailing list archive at Nabble.com.

Dynamic datasource with Camel 2.15.x

2015-10-02 Thread burner
// Here I build my route from("direct:xyz") .to("jdbc:myDataSource") } } Thank you for help -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-datasource-with-Camel-2-15-x-tp5772178.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dynamic datasource with Camel 2.15.x

2015-10-02 Thread Joakim Bjørnstad
; > // Here I build my route > from("direct:xyz") > .to("jdbc:myDataSource") > } > } > > Thank you for help > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Dynamic-datasource-with-Camel-2-15-x-tp5772178.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Kind regards Joakim Bjørnstad

Re: Dynamic DataSource

2015-09-14 Thread arnaud
s message in context: http://camel.465427.n5.nabble.com/Dynamic-DataSource-tp5771402p5771487.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dynamic DataSource

2015-09-11 Thread Claus Ibsen
You can build the uri dynamic as in this FAQ http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html On Thu, Sep 10, 2015 at 1:56 PM, arnaud <arnaud.merc...@free.fr> wrote: > Hello, > > Id'like to use a dynamic datasource with the camel-sql component but it's > not wo

Re: Dynamic DataSource

2015-09-11 Thread arnaud
vax.sql.DataSource Arnaud -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-DataSource-tp5771402p5771427.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dynamic DataSource

2015-09-11 Thread Christian Müller
Is the dataSource configured in your context? Best, Christian Am 10.09.2015 13:56 schrieb "arnaud" <arnaud.merc...@free.fr>: > Hello, > > Id'like to use a dynamic datasource with the camel-sql component but it's > not woking as I expected: > After a search on

Dynamic DataSource

2015-09-10 Thread arnaud
Hello, Id'like to use a dynamic datasource with the camel-sql component but it's not woking as I expected: After a search on the forum, I have found a topic "Dynamic DataSource for SQL", I try to do something similar : from("direct:create") .setHeader("dataSource",

Re: Dynamic DataSource for SQL

2014-06-09 Thread Matt Raible
Thanks for the advice. I've tried to implement this. Here's what my code looks like: from(direct:lookup) .process(new Processor() { public void process(Exchange exchange) throws Exception { MemberRequest request = exchange.getIn().getBody(MemberRequest.class);

Re: Dynamic DataSource for SQL

2014-06-09 Thread Claus Ibsen
Hi Ah dataSource=:#dataSource should just be #dataSource, eg as its a regular lookup in the registry. See more at http://camel.apache.org/how-do-i-configure-endpoints.html Its only the SQL component that has that special :#key for the SQL placeholders (eg with a colon). On Mon, Jun 9, 2014 at

Re: Dynamic DataSource for SQL

2014-06-09 Thread Matt Raible
I'm not sure that's it. It's almost like the SQL Component doesn't like column names specified in the SQL. I tried changing it to SELECT * FROM MEMBER and then hard-coding the dataSource name to match a bean name, and it works. I guess I can live with using select *, but you'd think any valid

Re: Dynamic DataSource for SQL

2014-06-09 Thread Claus Ibsen
On Mon, Jun 9, 2014 at 8:50 PM, Matt Raible m...@raibledesigns.com wrote: I'm not sure that's it. It's almost like the SQL Component doesn't like column names specified in the SQL. I tried changing it to SELECT * FROM MEMBER and then hard-coding the dataSource name to match a bean name, and

Re: Dynamic DataSource for SQL

2014-06-09 Thread Matt Raible
On Jun 9, 2014, at 1:03 PM, Claus Ibsen claus.ib...@gmail.com wrote: On Mon, Jun 9, 2014 at 8:50 PM, Matt Raible m...@raibledesigns.com wrote: I'm not sure that's it. It's almost like the SQL Component doesn't like column names specified in the SQL. I tried changing it to SELECT * FROM

Re: Dynamic DataSource for SQL

2014-06-09 Thread Claus Ibsen
Den mandag den 9. juni 2014 skrev Matt Raible m...@raibledesigns.com: On Jun 9, 2014, at 1:03 PM, Claus Ibsen claus.ib...@gmail.com javascript:; wrote: On Mon, Jun 9, 2014 at 8:50 PM, Matt Raible m...@raibledesigns.com javascript:; wrote: I'm not sure that's it. It's almost like the SQL

Re: Dynamic DataSource for SQL

2014-06-08 Thread Claus Ibsen
Hi If you se to then the uri is computed statically, eg once when the route is initialized. So the dynamic to is a good practice for dynamic uris http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html As you can the pass in the dataSource parameter dynamically. As well construct the SQL

Re: Dynamic DataSource for SQL

2014-06-07 Thread Antoine DESSAIGNE
Hello Matt, You'll have to use the recipient list [1] pattern: from(direct:projects) .setProperty(ds, /* logic to convert client param to datasource name */) .setHeader(target, simple(sql:select * from projects order by id?dataSource=${property.ds}) .recipientList(header(target))

Dynamic DataSource for SQL

2014-06-06 Thread Matt Raible
Hello, I'm converting services written with IBM Message Broker 6.1 to Apache Camel. Here's some of the logic I'm trying to convert: SET Environment.Variables.dataSource = ''; CASE UPPER(InputRoot.XMLNSC.ns:memberLookupRequest.ns:args0.ax21:Client) WHEN 'client1' THEN SET