camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Keep the routes created dynamically after restarting
Date Thu, 19 Jan 2012 15:01:05 GMT
Hi

Just marshal the routes to XML *before* you add new routes dynamic.


On Thu, Jan 19, 2012 at 3:59 PM, Nicolas Gapaillard
<nicolas.gapaillard@gmail.com> wrote:
> Hi,
>
> Thank you for your answer,
>
> I'm not sure it is really adapted to my problem.
>
> Because I need to export automatically, not manually. I want that my camel
> server has always the last routes. For example, if my camel server crashes,
> I want to keep all the routes created before the crashe.
>
> Or maybe I can use your solution plugged on a new implementation of a camel
> lifecycleStrategy:
>
> - Export for each route creation/deletion using my own camel
> LifecycleStrategy implementation.
> - And load all routes during the camel context startup.
>
> It means that performance will be slower => it is necessary to marshall the
> xml for each route creation/deletion (ok it is not so critical in my case I
> think).
>
>  But it seems to me a complex solution for a problem that looks simple.
>
> If someone has an other way to investigate or say me that there isn't
> another solution, don't hesitate.
>
> Thank you.
>
>
>
>
>
>
>
>
>
>
>
> 2012/1/19 Claus Ibsen <claus.ibsen@gmail.com>
>
>> Hi
>>
>> Yeah can export the routes as XML, and then load them upon restart.
>>
>> A little example to load the routes
>> http://camel.apache.org/loading-routes-from-xml-files.html
>>
>> Then to save them is also fairly easy.
>>
>>
>>
>> On Thu, Jan 19, 2012 at 1:55 PM, Nicolas Gapaillard
>> <nicolas.gapaillard@gmail.com> wrote:
>> > Hi all,
>> >
>> > Is is something in camel that permits to persist the routes created
>> > dynamically in bdd or an xml file ?
>> >
>> > Because for now, I have an application that permits to instanciate new
>> > routes inside camel via the RoutesBuilder. It works very well. But if
>> camel
>> > is restarted, I lose all my already defined routes.
>> >
>> > I searched inside the documentation and I didn't see anything about that.
>> >
>> > For info, I use the 2.9.0 version of apache camel.
>> >
>> > If someone has an idea.
>> >
>> > Thank you.
>> >
>> >
>> >
>> > --
>> > Nicolas Gapaillard
>> > nicolas.gapaillard@gmail.com
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>
>
>
> --
> Nicolas Gapaillard
> nicolas.gapaillard@gmail.com



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message