ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <Larry.Mead...@plumcreek.com>
Subject Re: Common practice to maintain sql maps and properties file
Date Tue, 07 Dec 2004 03:42:25 GMT
Same here - I have a config/(environment) folder that i use to put the
configuration files into. Then I use ant to copy them to the appropriate
location when I build.

If you are using CVS, you can use the .cvsignore files to make sure that
you do not accidentally commit them in place.

>>> clinton.begin@gmail.com 12/06/04 7:32 PM >>>
You could use the URL syntax (i.e.
file:///usr/local/blah/my.properties) to point to your database
properties file.  Although, I've always been a fan of building
separate WAR files for each environment.  Same build, different
configuration.  Ant populates environment properties and builds a war
for each one.

Cheers,
Clinton


On Mon, 6 Dec 2004 09:50:59 -0500, Nilesh Bhattad
<nilesh@outlinesys.com> wrote:
>  
> Folks, 
> This is how I keep all the mapping files, SqlMapConfig.xml(each per
> application) and 1 common SqlMapConfig.properties which has the
database
> connection parameters for all the applications. 
>   
> src 
>   | 
>   | 
>   |___ XML.app1.ibatis.maps 
>   |                        | 
>   |                        |___ all mapping files, SqlMapConfig.xml 
>   | 
>   | 
>   |___ XML.app2.ibatis.maps 
>   |                        | 
>   |                        |___ all mapping files, SqlMapConfig.xml 
>   | 
>   | 
>   |___ SqlMapConfig.properties 
>   
>   
> With this approach, all these files become part of the WAR. And I
think this
> is not a workable solution if I have to deploy the project onto QA and
> further environments. 
>   
> Just wondering, how do you guys maintain these config files? Do you
keep it
> in current working directory so that they are not part of WAR and each
> environment can configure database connection parameters seperately?
Also,
> if I keep SqlMapConfig.properties inside current working directory,
how do I
> access it inside SqlMapConfig.xml? 
>   
> Help please! 
>   
> Regards 
> Nilesh 
>


Mime
View raw message