camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henryk Konsek <hekon...@gmail.com>
Subject Re: Can I write a route that reads an arbitrary database table and stores it in a file?
Date Sat, 11 Jan 2014 18:42:05 GMT
If your test is a junit test with local Camel context, then you can add
data source with given DB coordinates to test registry as a part of the
fixtures setup. Check out createRegistry method of CamelTestSupport class.
On Jan 7, 2014 8:22 PM, "Lothar Werzinger" <lothar@tradescape.biz> wrote:

> Sorry for my late reply. I was quite busy.
>
>
> On Mon, Jan 6, 2014 at 2:06 PM, Henryk Konsek <hekonsek@gmail.com> wrote:
>
> > Hi Lothar,
> >
> > > I was hoping for some kind of dynamic route building that would allow
> me
> > to
> > > use the jdbc or sql component.
> >
> > In general dynamic endpoint specification can be achieved via
> > Recipient List [1] EIP. You can use singleton list to create "dynamic"
> > endpoint.
> >
> > The problem is that both SQL [2] and JDBC [3] components require you
> > to specify the DataSource instance in the registry, so you need to
> > specify them upfront and put into registry.
> >
>
> That is exactly why  asked the question ;-)
>
>
> > BTW Why do you pass DB coordinates and credentials as the message?
> > This is pretty unusual, to be honest. :)
> >
>
> I agree it is.
>
> The use case is regression testing.
>
> I want to write a generic route that dumps a table to a file, so that it
> can be automatically compared to an already stored file.
> The user of the route (a regression test route) would simply pass in the
> database connection information, the table name and the name of the stored
> file to compare against.
>
> The "test framework" needs to be generic and can not know beforehand what
> db connections the actual test will need to use.
>
> Cheers.
> >
> > [1] http://camel.apache.org/recipient-list.html
> > [2] http://camel.apache.org/sql-component.html
> > [3] http://camel.apache.org/jdbc
> >
> > --
> > Henryk Konsek
> > http://henryk-konsek.blogspot.com
> >
>
>
>
> --
>
> Lothar Werzinger
>
> Principal Architect
>
> Tradescape, Inc. - Enabling Efficient Digital Marketplaces
>
> +1-650-931-6719 (direct)
>
> +1-800-697-6068 (main) Ext. 116
>
> lothar@tradescape.biz
>
> http://www.tradescape.biz
>
> --
>
>
> This message and any attachment (the "message") is intended solely for the
> addressees and is confidential. If you receive this message by mistake,
> please delete it and notify the sender immediately. Any use not
> in accordance with its purpose, any out-spread or disclosure, either as a
> whole or partially, is prohibited except with formal approval. Internet
> cannot guarantee the integrity of this message, therefore Tradescape will
> not be liable for the message if modified.
>
> -
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message