Hi, this works for me well,
and you can teach yourself with Rick Reumann lessons. http://www.learntechnology.net/content/ibatis/spring_ibatis.jsp <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="${driverOracle}"/> <property name="url" value="${urlOracle}"/> <property name="username" value="${userora}"/> <property name="password" value="${passwordora}"/> </bean> <bean id="dataSourceMSSQL" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" > <value>com.microsoft.jdbc.sqlserver.SQLServerDriver" </value> </property> <property name="url"> <value>jdbc:sqlserver://192.168.0.2;1433;integratedSecurity=true</value> </property> <property name="username"> <value>sa</value> </property> <property name="password"> <value>konus</value> </property> </bean> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:spring.properties"/> </bean> <bean name="/actions" class="baseportal.com.portal.actions.ActionsAction"> <constructor-arg index="0" ref="newsModel"/> </bean> <bean id="newsDao" class="baseportal.com.portal.dao.NewsDAO"> <property name="sqlMapClient"> <ref local="sqlMapClient"/> </property> </bean> <bean id="newsModel" class="baseportal.com.portal.model.NewsModel"> <constructor-arg index="0" ref="newsDao"/> </bean> <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> <property name="configLocation"> <value>classpath:com/portal/daoconf/sql-map-config.xml</value> </property> <property name="useTransactionAwareDataSource"> <value>true</value> </property> <property name="dataSource"> <ref bean="dataSource"/> </property> </bean> <bean id="sqlMapClientMSSQL" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> <property name="configLocation"> <value>classpath:com/portal/daoconf/sql-map-mssql.xml</value> </property> <property name="useTransactionAwareDataSource"> <value>true</value> </property> <property name="dataSource"> <ref bean="dataSourceMSSQL"/> </property> </bean> <bean name="/rests" class="baseportal.com.portal.actions.RestAction"> <constructor-arg index="0" ref="restModel"/> </bean> <bean id="restModel" class="baseportal.com.portal.model.RestModel"> <constructor-arg index="0" ref="restDao"/> </bean> <bean id="restDao" class="baseportal.com.portal.dao.RestDAO"> <property name="sqlMapClient"> <ref local="sqlMapClientMSSQL"/> </property> </bean> </beans> LD> Hello Meindert, LD> First of all thanks a lot for your response... LD> I don't understand the meaning of your assertion, is it a problem pointing to the dtd ? LD> What is the correlation with the transaction problem ? LD> Thank you ! LD> ________________________________ LD> Da: Meindert [mailto:[EMAIL PROTECTED] LD> Inviato: martedì 10 aprile 2007 11.45 LD> A: user-java@ibatis.apache.org LD> Oggetto: RE: Spring-Ibatis configuration problem. LD> You are pointing to http://www.ibatis.com/dtd/sql-map-2.dtd in your configuration LD> ________________________________ LD> From: Loro Diego [mailto:[EMAIL PROTECTED] LD> Sent: 10 April 2007 11:07 AM LD> To: [EMAIL PROTECTED] LD> Cc: user-java@ibatis.apache.org LD> Subject: Spring-Ibatis configuration problem. LD> Hi, LD> In my project I use Ibatis and Spring (see attachments for details). LD> While configuring transaction management in Spring I have this problem: LD> - All Ibatis insert statements goes wrong (I think it is a commit problem, because I don't get exceptions) LD> The select statements are all ok. LD> Can you give me some help? LD> Thank you very much, LD> Diego -- Ñ óâàæåíèåì, Rogov mailto:[EMAIL PROTECTED]