4.3. SqlMap DAO Session Handler Example Configuration

The SqlMap session handler implementation wraps iBATIS Data Mapper SqlMapper session management services for simple use via the DAO framework. All you need to specify is the SqlMap configuration file.

Example 4.2. Example SqlMap DAO Session Handler configuration

<context id="SqlMapDao">
  <properties resource="database.config"/>

  <database>
    <provider name="OleDb1.1"/>
    <dataSource name="iBatisNet" 
                connectionString="Provider=SQLOLEDB;Server=${database};database=IBatisNet;
                user id=${userid};password=${password};"/>
  </database>

  <daoSessionHandler id="SqlMap">
    <property name="resource" value="SqlMap.config"/>
  </daoSessionHandler>

  <daoFactory>
    <dao interface="IBatisNet.Test.Dao.Interfaces.IAccountDao, IBatisNet.Test" 
         implementation="IBatisNet.Test.Dao.Implementations.DataMapper.AccountDao, IBatisNet.Test"/>
 </daoFactory>
</context>