tags:

views:

78

answers:

1

I've a function updating database table using Spring's JdbcTemplate and for some reason there was exceptin that connection is read only u can not update any database related changes. How to resolve these problem?

A: 

Check the transaction property. Is it Read-Only?
http://static.springsource.org/spring/docs/2.0.x/reference/transaction.html

Try adding this to the datasource defination

    <property name="defaultReadOnly">
        <value>false</value>
    </property>
Padmarag
This would rather solve the problem... Thank you for reply.. But actually i had given a property to Transaction advice like this and it was causing the problem....<tx:advice id="txAdvice"> <tx:attributes> <tx:method name="save*"/> <!-- <tx:method name="*" read-only="true"/> --> </tx:attributes> </tx:advice>As u can see i had now commented the code of line which are making my all methods connection read only...Again Thanks for the reply.
Yogi