
Originally Posted by
bincbom
Hello Everyone!
We are building a data model using Spring DAO, and this model is based on the Petclinic sample application in Spring 1.1.5 (ibatis flavor).
Everything is working. But I'm wondering about transactions, and what I have to do to set them up correctly. Here is our datasource/txn manager configuration:
<beans>
<bean id="dataSource" class="com.ibatis.common.jdbc.SimpleDataSource">
<constructor-arg>
<map>
<entry key="JDBC.Driver"><value>org.hsqldb.jdbcDriver</value></entry>
<entry key="JDBC.ConnectionURL"><value>jdbc:hsqldb:hsql://10.250.1.23</value></entry>
<entry key="JDBC.Username"><value>sa</value></entry>
<entry key="JDBC.Password"><value></value></entry>
<entry key="JDBC.DefaultAutoCommit"><value>true</value></entry>
</map>
</constructor-arg>
</bean>
<!-- Transaction manager for a single JDBC DataSource -->
<!-- (see dataAccessContext-jta.xml for an alternative) -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSou rceTransactionManager">
<property name="dataSource"><ref local="dataSource"/></property>
</bean>
<!-- SqlMap setup for iBATIS Database Layer -->
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClient FactoryBean">
<property name="configLocation"><value>conf/sql-map-config.xml</value></property>
<property name="dataSource"><ref local="dataSource"/></property>
</bean>
Does this current arrangement provide transactions or not? Or do I need to set up a transaction proxy and specify which methods actually get transactions? How can I tell whether transactions are actually being used?
Please advise.
Thanks in advance,
craig vanderborgh
voxware incorporated