ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Folashade Adeyosoye" <sharda...@gmail.com>
Subject dao.xml and sql-map-config.xml
Date Thu, 23 Jun 2005 18:51:29 GMT
Here is my question relating to configuration.

 

I know in the dao.xml and sql-map-config.xml should look like the ones
below, but do I have to also define a transactionManager type="JDBC" in the
SQL-MAP-CONFIG.XML and just stick to the one in the DAO.XML, I t think they
might be doing the same thing, and if there is a need to change the
"<properties
resource="net/naijatek/fgconline/properties/database_dev_local.properties"/>
", I would have to change them in both places.

 

 

Thanks

Shardayyy

 

 

 

======================= SQL-MAP-CONFIG.XML
==============================================

 

<sqlMapConfig>

 

  <properties
resource="net/naijatek/fgconline/properties/database_dev_local.properties"/>

 

 

  <settings

    cacheModelsEnabled="true"

    enhancementEnabled="true"

    maxSessions="64"

    maxTransactions="8"

    maxRequests="128"/>

 

  <transactionManager type="JDBC">

    <dataSource type="SIMPLE">

      <property value="${driver}" name="JDBC.Driver"/>

      <property value="${url}" name="JDBC.ConnectionURL"/>

      <property value="${username}" name="JDBC.Username"/>

      <property value="${password}" name="JDBC.Password"/>

      <property value="15" name="Pool.MaximumActiveConnections"/>

      <property value="15" name="Pool.MaximumIdleConnections"/>

      <property value="1000" name="Pool.MaximumWait"/>

    </dataSource>

  </transactionManager>

 

 

  <sqlMap
resource="net/naijatek/fgconline/persistence/sqlmapdao/sql/Member.xml"/>

  <sqlMap
resource="net/naijatek/fgconline/persistence/sqlmapdao/sql/PrivateMessage.xm
l"/>

  <sqlMap
resource="net/naijatek/fgconline/persistence/sqlmapdao/sql/SelectionObject.x
ml"/>

  <sqlMap
resource="net/naijatek/fgconline/persistence/sqlmapdao/sql/SystemTask.xml"/>

  <sqlMap
resource="net/naijatek/fgconline/persistence/sqlmapdao/sql/AnnAndAdv.xml"/>

 

</sqlMapConfig>

 

 

 

 

 

 

 

 

 

 

 

========= DAO.XML =======================

<daoConfig>

 

<properties
resource="net/naijatek/fgconline/properties/database_dev_local.properties"/>

 

  <context>

 

   <transactionManager type="JDBC">

      <property name="DataSource" value="SIMPLE"/>

      <property name="JDBC.Driver" value="${driver}"/>

      <property name="JDBC.ConnectionURL" value="${url}"/>

      <property name="JDBC.Username" value="${username}"/>

      <property name="JDBC.Password" value="${password}"/>

      <property name="JDBC.DefaultAutoCommit" value="true"/>

      <property name="Pool.MaximumActiveConnections" value="15"/>

      <property name="Pool.MaximumIdleConnections" value="15"/>

      <property name="Pool.MaximumCheckoutTime" value="120000"/>

    </transactionManager>

 

<!--   YES IT IS COMMENTED OUT, THIS IS MY OTHER IMPLEMENTATION

    <dao interface="net.naijatek.fgconline.persistence.iface.MemberDAO"
implementation="net.naijatek.fgconline.persistence.jdbcsql.MysqlMemberDAO"/>

    <dao
interface="net.naijatek.fgconline.persistence.iface.SelectionObjectDAO"
implementation="net.naijatek.fgconline.persistence.jdbcsql.MysqlSelectionObj
ectDAO"/>

    <dao interface="net.naijatek.fgconline.persistence.iface.AnnAndAdvDAO"
implementation="net.naijatek.fgconline.persistence.jdbcsql.MysqlAnnAndAdvDAO
"/>

    <dao
interface="net.naijatek.fgconline.persistence.iface.PrivateMessageDAO"
implementation="net.naijatek.fgconline.persistence.jdbcsql.MysqlPrivateMessa
geDAO"/>

    <dao interface="net.naijatek.fgconline.persistence.iface.SystemTasksDAO"
implementation="net.naijatek.fgconline.persistence.jdbcsql.MysqlSystemTasksD
AO"/>

-->

    <dao interface="net.naijatek.fgconline.persistence.iface.MemberDAO"
implementation="net.naijatek.fgconline.persistence.sqlmapdao.IbatisMemberDAO
"/>

    <dao
interface="net.naijatek.fgconline.persistence.iface.SelectionObjectDAO"
implementation="net.naijatek.fgconline.persistence.sqlmapdao.IbatisSelection
ObjectDAO"/>

    <dao interface="net.naijatek.fgconline.persistence.iface.AnnAndAdvDAO"
implementation="net.naijatek.fgconline.persistence.sqlmapdao.IbatisAnnAndAdv
DAO"/>

    <dao
interface="net.naijatek.fgconline.persistence.iface.PrivateMessageDAO"
implementation="net.naijatek.fgconline.persistence.sqlmapdao.IbatisPrivateMe
ssageDAO"/>

    <dao interface="net.naijatek.fgconline.persistence.iface.SystemTasksDAO"
implementation="net.naijatek.fgconline.persistence.sqlmapdao.IbatisSystemTas
ksDAO"/>

 

  </context>

</daoConfig>


Mime
View raw message