ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Beelen (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-381) Configure SqlMapClientBuilder with multiple resources
Date Fri, 05 Jan 2007 10:26:27 GMT
Configure SqlMapClientBuilder with multiple resources

                 Key: IBATIS-381
                 URL: https://issues.apache.org/jira/browse/IBATIS-381
             Project: iBatis for Java
          Issue Type: Improvement
          Components: SQL Maps
    Affects Versions: 2.3.0
            Reporter: Marco Beelen

I would like to have the ability to configure an SqlMapClientBuilder using multiple sqlMapConfig.xml-files.

I'm working on a multi-module project using maven2 to build a webapplication. The project
requires some common code for all applications in our organisation and some project specific
code. In the common-modules and in one of project specific module I need some database access
and would like to use iBatis SqlMap for this.

Each of the modules has their own sqlMapConfig-file which defines some TypeHandlers and sqlMap
resources. ( Mainly used to for unit testing the modules )

In my webapp I need to have the sqlMap-resources loaded from at least to modules. Now I need
to write one sqlMapConfig-webapp.xml with duplicaties all the entries of typeHandlers and

I'm using Spring to configure my entire application and for the sqlMapClient it looks like

<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
	<property name="configLocation" value="classpath:/sqlMapConfig-webapp.xml" />
	<property name="dataSource" ref="dataSource" />

I would like to have support for:

<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
	<property name="configLocations">
			<value>classpath:/sqlMapConfig-common.xml" </value>
			<value>classpath:/sqlMapConfig-project.xml" </value>
	<property name="dataSource" ref="dataSource" />

Prior to Spring supporting this, iBatis should be able to handle loading multiple config-files,
so I would like to see the following methods being added:

public static SqlMapClient  buildSqlMapClient(java.io.Reader[] readers);
public static SqlMapClient  buildSqlMapClient(java.io.Reader[] readers, java.util.Properties

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message