ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson Gomes (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATISNET-94) DomDaoManagerBuilder cannot set more than one provider element when defining more than one SqlMaps and databases in DAO.config
Date Thu, 21 Jul 2005 01:06:45 GMT
DomDaoManagerBuilder cannot set more than one provider element when defining more than one
SqlMaps and databases in DAO.config
------------------------------------------------------------------------------------------------------------------------------

         Key: IBATISNET-94
         URL: http://issues.apache.org/jira/browse/IBATISNET-94
     Project: iBatis for .NET
        Type: Bug
    Versions: DataAccess 1.6.1    
 Environment: Windows Xp, .NET Framework 1.1
    Reporter: Anderson Gomes
 Assigned to: Gilles Bayon 
    Priority: Critical


DomDaoManagerBuilder cannot set more than one provider element when defining more than one
SqlMaps and databases in DAO.config

For example: 

<context id="InformixMapDao">

		<properties resource="../../database.config"/>
		
		<database>
			<provider name="Informix"/>
			<dataSource name="iBatisNet" connectionString="User Id=${Ifxuserid};Database=${Ifxdatabase};Host=${Ifxhost};password=${Ifxpassword};Server=${Ifxserver};Protocol=${Ifxprotocol};
Service==${Ifxservice};"/>
		</database>		
		
		<daoSessionHandler id="SqlMap">
			<property name="url" value="D:\PROJETOS\SIGA\CookBooks\Persistencia\ONSA\Ons.Onsa.Persistence.Tests\bin\Debug\SqlMapInformix.config"/>
		
		</daoSessionHandler>
		
		<daoFactory>
		      <dao interface="Siga.Persistencia.Interfaces.Forum.IMembroDao, Siga.Persistencia"
implementation="Siga.Persistencia.MapperDao.Forum.MembroSqlMapDao, Siga.Persistencia"/>
		</daoFactory>
		
	</context>	
	
	<context id="SqlServerMapDao">

		<properties resource="../../database.config"/>
		<database>
			<provider name="sqlServer1.1"/>
			<dataSource name="iBatisNet" connectionString="data source=${MSSQLdatasource};database=${MSSQLdatabase};user
id=${MSSQLuserid};password=${MSSQLpassword};connection reset=false;connection lifetime=5;
min pool size=1; max pool size=50"/>
		</database>		
		
		<daoSessionHandler id="SqlMap">
			<property name="url" value="D:\PROJETOS\SIGA\CookBooks\Persistencia\ONSA\Ons.Onsa.Persistence.Tests\bin\Debug\SqlMapMSSQL.config"/>
		
		</daoSessionHandler>
		
		
		<daoFactory>
		      <dao interface="Siga.Persistencia.Interfaces.Forum.IMembroDao, Siga.Persistencia"
implementation="Siga.Persistencia.MapperDao.Forum.MembroSqlMapDao, Siga.Persistencia"/>
		</daoFactory>
		
	</context>

It happens because of the method (on DomDaoManagerBuilder.cs file): 
private Provider ParseProvider(ConfigurationScope configurationScope).

I changed the line  XmlNode node = configurationScope.NodeContext.SelectSingleNode("//database/provider");

TO: configurationScope.NodeContext.SelectSingleNode("database/provider"); 

Like the other Parsers methos in this class... It will correct the bug.

Thanks,
Anderson



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


Mime
View raw message