Hi,
thanks for your answer.
Unfortunately, is does not help. We do not use Spring in this
application, only iBATIS as "standalone" ...
Regards,
Ralf
-------------------------------------------------------------------
Ralf Assmann, Dipl.-Ing. (FH)
Innovations Softwaretechnologie GmbH
Ziegelei 7, 88090 Immenstaad, Germany
Tel.: +49 7545 202-324
Tel.: +49 7545 202-300 (Zentrale)
Fax.: +49 7545 202-301
Email: [EMAIL PROTECTED]
Web: http://www.innovations.de
-------------------------------------------------------------------
Geschaeftsfuehrung:
Achim Berger, Thomas Cotic, Walter Pitz
Reg.-Gericht Ulm HRB 631622
-------------------------------------------------------------------
Meindert schrieb:
Hi Ralf,
Not sure if it will answer your question but the Ibatis ADO framework
has been depreciated.
We wrote a little piece in the Wiki how to convert jpetstore to the
Spring ADO framework,
You will set the transaction isolation in the Spring configuration
files (or by annotation)
http://opensource.atlassian.com/confluence/oss/display/IBATIS/Converting+iBATIS+DAO+to+Spring+DAO
This wiki is missing the changes to make for the transactions;
1) Add cglib-nodep-2.1_3.jar to the classpath
*2) OrderService.java*
Add the annotation for spring to implement transactions, meaning
at @Transactional just above the insertOrder method
at @Transactional(readOnly=true)just above the getOrder method
Add a empty constructor;
public OrderService() {
}
3) Spring config
Add the following to the spring config file;
<!-- TRANSACTIONS -->
<bean id="txManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
</bean>
<bean
class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"/>
<bean
class="org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor">
<property name="transactionInterceptor" ref="txInterceptor"/>
</bean>
<bean id="txInterceptor"
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="txManager"/>
<property name="transactionAttributeSource">
<bean
class="org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"/>
</property>
</bean>
I didn’t try but, tom told me that you can simplify this to:
/<bean id="txManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">//
/
/<property name="dataSource">///
/<ref bean="dataSource"/>///
/</property>///
/</bean>///
/ /
/followed by:/
/ /
/<tx:annotation-driven transaction-manager="txManager"/>/
/ /
/You can even get rid of the transaction-manager="txManager" part if
you rename your DataSourceTransactionManager bean to
"transactionManager," e.g.,/
/ /
/<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">/
/.../
/</bean>/
/ /
/See: http://tinyurl.com/yqncrj/
/ /
/Tom/
-----Original Message-----