ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfs <farhan.sar...@gmail.com>
Subject Re: DAO Framework - how to disable connection pooling..
Date Thu, 09 Oct 2008 19:14:32 GMT

Just thought to post the complete configuration of dao.xml and
sql-map-config..

dao.xml
========
<context id="[name]">

    <transactionManager type="SQLMAP">
      <property name="SqlMapConfigResource"
        value="com/package/sql-map-config.xml"/>
    </transactionManager>

    <dao interface="xyz.dao.MyDAO"
      implementation="xyz.dao.impl.MyDAOImpl"/>

    <dao interface="xyz.dao.MyDAO2"
      implementation="xyz.dao.impl.MyDAO2Impl"/>
      
  </context>

sql-map-config.xml
===============
<sqlMapConfig>
  <typeHandler javaType="java.sql.Blob"
callback="xyz.BlobTypeHandlerCallback" />

  <transactionManager type="JDBC" commitRequired="true">
	<dataSource type="JNDI">
      <property name="DataSource" value="jdbc/proxy"/>
    </dataSource>
  </transactionManager>

  <sqlMap resource="xyz/mapping/BeanMapping1.xml"/>
  <sqlMap resource="xyz/mapping/BeanMapping2.xml"/>
  <sqlMap resource="xyz/mapping/BeanMapping3.xml"/>
  <sqlMap resource="xyz/mapping/BeanMapping4.xml"/>
</sqlMapConfig>




mfs wrote:
> 
> Ok, well these would sound funny, but i didn't knew at all before today
> that iBatis DAO framework uses connection pooling internally. Anyways i am
> somewhat struggling to figure out as to how to disable it..I dont have any
> attribute relating to it (and thats why didnt knew at all) but apparently
> a 10 connections pool is maintained by default...
> 
>   <transactionManager type="JDBC" commitRequired="true">
> 	<dataSource type="JNDI">
>       <property name="DataSource" value="jdbc/[schema]"/>
>      </dataSource>
>   </transactionManager>
> 
> Please comment..
> 
> I do plan to switch over to Spring DAOs soon, but for a month or so i will
> relying on the same..
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/DAO-Framework---how-to-disable-connection-pooling..-tp19894728p19905425.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message