ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From loctorp <boris.kartasch...@logica.com>
Subject using system properties to configure sql-map-config.xml
Date Wed, 28 Jan 2009 10:29:14 GMT

hello everybody;
We have a situation where we need a map as follows:
<select id="getTableNames" parameterClass="dataspace"
resultClass="java.lang.String">
		show tables from ${DATABASE}$ LIKE "%$tableName$%";
	</select>
right now we set the property {DATABASE} in a property file that is loaded
into sql-Map-config.xml file.
This works all right...

For our JAVA-Project we use a system property file which also contains the
information about the DATABASE (e.g. needed for JUNIT tests).

Is it possible to set (or create dynamically) the properties in the
sql-Map-config.xml from the system properties or to set the ${DATABASE}$
variable directly? This would be nice as we could avoid duplicate property
settings and redundant informations...

I mean, what we would love to is:
set our DATABASE in the system properties. IBATIS then takes this system
property variable and eather creates the sql-map-config.xml (preferred) or
sets ${DATABASE}$ directly into the mapping file (not so good, but
interesting too).

What do you think? 
-- 
View this message in context: http://www.nabble.com/using-system-properties-to-configure-sql-map-config.xml-tp21703256p21703256.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message