You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Laurentiu Trica <la...@finalfolder.biz> on 2011/03/09 12:16:57 UTC
Best practice when choosing configuration between test and production server
Hello,
I'm using Camel with Servicemix and I have a hard time managing the test and
production server configurations for endpoints.
Is there a way to go in this cases?
I mean, I have different route details for test and production servers, so I
have to constantly pay attention when deploying.
And this is a stopper for automatic testing my application.
Any piece of information is welcomed!
Thank you.
--
Laurentiu Trica
Software Developer Mobile: (+40) 722 329318
S.C MoreDevs S.R.L. Email: laurentiu.trica@finalfolder.biz
This message can contain privileged or confidential information and it is
intended only for addressee. Any unauthorized disclosure is strictly
prohibited.
Re: Best practice when choosing configuration between test and production
server
Posted by Christian Schneider <ch...@die-schneider.net>.
Hi,
you should use properties for the endpoint urls or for parts of them.
Often it is also a good idea to split spring contexts into a fixed part
and a part that is different for the stages.
In the test project deploy your test properties in src/test/resources.
In the server then deploy your real properties on the classpath. I have
also seen projects that use a -D variable for starting the server. So
for example
they have -Dstage=prod to indicate te production system. Then they can
use this property in the spring config to load different property files.
Christian
Am 09.03.2011 12:16, schrieb Laurentiu Trica:
> Hello,
>
> I'm using Camel with Servicemix and I have a hard time managing the test and
> production server configurations for endpoints.
> Is there a way to go in this cases?
> I mean, I have different route details for test and production servers, so I
> have to constantly pay attention when deploying.
> And this is a stopper for automatic testing my application.
>
> Any piece of information is welcomed!
> Thank you.
>
--
----
http://www.liquid-reality.de