On Tue, Nov 9, 2010 at 1:31 PM, Olivier.Roger <[email protected]> wrote: > > Hi Claus, > > That seems to be what I needed. > > I still have a few questions: > > 1 - In what type of database field should I persist the Exchange objects? > I was thinking to save it as a Blob, would that be a good fit ? >
Yeah you need something like BLOB as the Exchange can contain any kind of data: XML, objects, binary or whatever. > 2 - About the Service lifecycle, I am not sure what the aggregator > repository would do on start and stop. > Do you see a reason why I should use it ? > Maybe verify the required table are created, if not create them ? > You should only use it if you need it. So only override doStart / doStop if you need to do some logic. For example maybe people would like to be able to pre check the database connection works and that the table exists. You can allow end users an option to configure this. Auto creating the table is good for development. But in production the DBA's most likely would like a create script but having them be in control of creating the table, set the indexes and whatnot. A side note many of the NoSQL database is a good fit for this as they tend to be key / value based which is essentially what's stored on the Exchange. key = body value = content of body key = header A value = content of header A etc. So that leaves room for a 3rd variation :) (Well HawtDB is already a key/value file based data store) > Thanks for your help! > > Olivier > -- > View this message in context: > http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3256717.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
