ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Munat <b...@munat.com>
Subject Re: Adding sqlmap at runtime
Date Thu, 23 Feb 2006 04:27:04 GMT
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:

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).


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


I think that should do ya.


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

View raw message