Richard Lin wrote:
> Is there anyway to add/load a sqlmap XML file at runtime instead of
> including in the sqlmap-config file?
>
> I'm working on a framework that needs to discover and load sqlmap  files
> dynamically from jars with classloader.
>

From the javadoc for SqlMapClientBuilder:

<quote>
Builds SqlMapClient instances from a supplied resource (e.g. XML configuration 
file)

The SqlMapClientBuilder class is responsible for parsing configuration documents and building the SqlMapClient instance. Its current implementation works with XML configuration files (e.g. sql-map-config.xml).

Example:

 Reader reader = Resources.getResourceAsReader("properties/sql-map-config.xml");
 SqlMapClient client = SqlMapClientBuilder.buildSqlMapClient (reader);

</quote>

I think that should do ya.

b

PS: hey guys, why isn't the javadoc available anywhere on the ibatis site?


Reply via email to