Jim,
The above article and hint to provide datasource in spring.xml was very meaningful. It helped me lot to understand over all concept of how struts-ibatis-spring works together.
I modified my SqlMapConfig.xml and spring,xml but my original problem is still there, which I have posted in zone. Can you please read my latest comment added this morning at
http://www.experts-exchang
or if you search for question title with 'Transaction Rollback not working with iBatis + Spring', its question ID: 24211987.
I have attached all the files. Please help me resolve this transaction issue.
Thanks
Main Topics
Browse All Topics





by: jim_cakalicPosted on 2009-03-10 at 09:52:18ID: 23848823
When integrating with Spring, the dataSource definition is done in the spring.xml and injected on the sqlMapClient as shown below:
dbcp.Basic DataSource ">
.orm.ibati s.SqlMapCl ientFactor yBean"> qol/gcc/ib atis/confi g/SqlMapCo nfig.xml</v alue> ataSource" >
.net/conte nt/ibatis/ spring_iba tis.jsp?st yle=print
<bean id="dataSource" class="org.apache.commons.
<property name="driverClassName" value="..."/>
<property name="url" value="..."/>
<property name="username" value="..."/>
<property name="password" value="..."/>
</bean>
<bean id="sqlMapClient" class="org.springframework
<property name="configLocation">
<value>classpath:org/nexweb/
</property>
<property name="useTransactionAwareD
<value>true</value>
</property>
<property name="dataSource">
<ref bean="dataSource"/>
</property>
</bean>
The iBATIS SqlMapConfig.xml is only used then for referencing the mapping files.
There is a more complete example here:
http://www.learntechnology