ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James, Steven" <Steven.Ja...@logicacmg.com>
Subject RE: Dynamic Database URL
Date Wed, 17 Aug 2005 06:38:48 GMT
This is possible just create a properties object and pass this to the sqlmap builder 
name the properties with keys like you have given in the sqlmapconfig.

<property name="JDBC.Driver" value="${driver}"/>
<property name="JDBC.ConnectionURL" value="${url}"/>
<property name="JDBC.Username" value="${username}"/>
<property name="JDBC.Password" value="${password}"/>

so the properties would have keys driver, url, username etc... 

i.e SqlMapClientBuilder.buildSqlMapClient(configReader,properties);

-----Original Message-----
From: Nathan Maves [mailto:Nathan.Maves@Sun.COM]
Sent: Wed 8/17/2005 5:34 AM
To: user-java@ibatis.apache.org
Subject: Re: Dynamic Database URL
Not sure that I understand you.

Let me explain a little better what I need and see if it is still the  

I have a program that I need to 3 different instances of, in 3  
different VM.

I just want to pass some parameters from the command line all the way  
to the sqlmap config.



On Aug 16, 2005, at 1:24 PM, Larry Meadors wrote:

> You can pass in a properties object to the sqlmapclient builder that
> is substituted into the sqlmapconfig.xml file.
> But, you will need 3 instances of the SqlMap client..
> Larry
> On 8/16/05, Nathan Maves <Nathan.Maves@sun.com> wrote:
>> Is there a way to dynamically change the db url based on a parameter
>> passed in at run time?
>> We have a program that needs to run against 3 different production
>> databases.  The only thing changing is the DB URL.
>> Nathan

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It
may contain proprietary material, confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any other party. If you are not
an intended recipient then please promptly delete this e-mail and any attachment and all copies
and inform the sender. Thank you.

View raw message