spring2.5,ibatis2.3 oracle11g只读事物不能生效

开发环境:spring2.5,ibatis2.3 oracle11g
执行一个get的service的方法时,日志里中显示设置了connection为readonly,但还是能写入数据库。
怎么才能让readonly的方法不能写入数据库呢,或者说怎么实现这个只读事物呢。
[code="java"]<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd" >

<!--该配置文件主要用于管理项目中的事务 -->








<aop:config>
    <aop:pointcut id="taxService"
        expression="execution(* bj.n22..service.*.*(..))" />
    <aop:advisor advice-ref="txAdvice" pointcut-ref="taxService" />
</aop:config>

<tx:advice id="txAdvice" transaction-manager="transactionManager">
    <tx:attributes>
        <tx:method name="save*" />
        <tx:method name="delete*" />
        <tx:method name="update*" />
        <tx:method name="new*" propagation="REQUIRES_NEW" />
        <tx:method name="*" read-only="true" />
    </tx:attributes>
</tx:advice>

<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">   
<property name="driverClass" value="oracle.jdbc.driver.OracleDriver"/>   
<property name="jdbcUrl" value="jdbc:oracle:thin:@192.168.1.251:1521:orcl"/>   
<property name="user" value="demo"></property>   
<property name="password" value="demo" />   
<property name="minPoolSize" value="1" />   
<property name="maxPoolSize" value="1" />   
<property name="maxIdleTime" value="1800" />   
<property name="acquireIncrement" value="2" />   
<property name="maxStatements" value="0" />   
<property name="initialPoolSize" value="1" />   
<property name="idleConnectionTestPeriod" value="1800" />   
<property name="acquireRetryAttempts" value="30" />   
<property name="breakAfterAcquireFailure" value="true" />   
<property name="testConnectionOnCheckout" value="false" />
<property name="preferredTestQuery" value="select * from dual" /> 
</bean>           


    <!--根据dataSource和configLocation创建一个SqlMapClient-->
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
    <property name="configLocation">
        <value>/WEB-INF/classes/spring/sqlMapConfig.xml</value>
    </property>
    <property name="dataSource">
        <ref bean="dataSource"/>
    </property>
</bean>

<!--将上面的模版类织入到我们的DAO对象中-->
<bean id="baseDao" class="bj.n22.base.dao.BaseDaoImpl" >
    <property name="sqlMapClient">
        <ref bean="sqlMapClient" />
    </property>
</bean>

 <import resource="application-log.xml"/>

[/code]

日志输出:
DEBUG [com.opensymphony.xwork2.util.InstantiatingNullHandler:72] Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@14b0c98], property=struts]
DEBUG [com.opensymphony.xwork2.DefaultActionProxy:65] Creating an DefaultActionProxy for namespace /log/log and action name edit
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory:389] No bean named 'bj.n22.rms.log.action.LogAction' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@103bc02: defining beans [dataSource,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,taxService,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,txAdvice,sqlMapClient,baseDao,logDao,logService]; root of factory hierarchy
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory:1071] Not autowiring property 'actionErrors' of bean 'bj.n22.rms.log.action.LogAction' by name: no matching bean found
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory:1071] Not autowiring property 'actionMessages' of bean 'bj.n22.rms.log.action.LogAction' by name: no matching bean found
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory:1071] Not autowiring property 'fieldErrors' of bean 'bj.n22.rms.log.action.LogAction' by name: no matching bean found
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory:203] Returning cached instance of singleton bean 'logService'
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory:1065] Added autowiring by name from bean name 'bj.n22.rms.log.action.LogAction' via property 'logService' to bean named 'logService'
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory:1071] Not autowiring property 'servletRequest' of bean 'bj.n22.rms.log.action.LogAction' by name: no matching bean found
DEBUG [com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil:141] cannot find method [prepareEdit] in action [bj.n22.rms.log.action.LogAction@296cf1]
DEBUG [com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil:141] cannot find method [prepareDoEdit] in action [bj.n22.rms.log.action.LogAction@296cf1]
DEBUG [com.opensymphony.xwork2.interceptor.I18nInterceptor:97] intercept '/log/log/edit' {
DEBUG [com.opensymphony.xwork2.interceptor.I18nInterceptor:110] requested_locale=null
DEBUG [com.opensymphony.xwork2.interceptor.I18nInterceptor:140] before Locale=zh_CN
DEBUG [com.opensymphony.xwork2.util.InstantiatingNullHandler:72] Entering nullPropertyValue [target=[bj.n22.rms.log.vo.Log@1cb150a, bj.n22.rms.log.action.LogAction@296cf1, com.opensymphony.xwork2.DefaultTextProvider@14b0c98], property=struts]
DEBUG [org.apache.struts2.interceptor.FileUploadInterceptor:204] Bypassing /log/log/ edit
DEBUG [com.opensymphony.xwork2.interceptor.StaticParametersInterceptor:83] Setting static parameters {}
DEBUG [com.opensymphony.xwork2.interceptor.ParametersInterceptor:148] Setting params logId => [ 1 ]
DEBUG [com.opensymphony.xwork2.util.XWorkConverter:388] Property: logId
DEBUG [com.opensymphony.xwork2.util.XWorkConverter:389] Class: bj.n22.rms.log.vo.Log
DEBUG [com.opensymphony.xwork2.util.XWorkConverter:404] converter is null for property logId. Mapping size: 0
DEBUG [com.opensymphony.xwork2.util.XWorkConverter:278] field-level type converter for property [logId] = none found
DEBUG [com.opensymphony.xwork2.util.XWorkConverter:302] global-level type converter for property [logId] = none found
DEBUG [com.opensymphony.xwork2.util.XWorkConverter:320] falling back to default type converter [com.opensymphony.xwork2.util.XWorkBasicConverter@1470933]
DEBUG [org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor:134] Validating /log/log/edit with method edit.
DEBUG [com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor:183] Invoking validate() on action bj.n22.rms.log.action.LogAction@296cf1
DEBUG [com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil:141] cannot find method [validateEdit] in action [bj.n22.rms.log.action.LogAction@296cf1]
DEBUG [com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil:141] cannot find method [validateDoEdit] in action [bj.n22.rms.log.action.LogAction@296cf1]
DEBUG [com.opensymphony.xwork2.DefaultActionInvocation:383] Executing action method = edit
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:319] Using transaction object [org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSourceTransactionObject@1714bf9]
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:347] Creating new transaction with name [bj.n22.rms.log.service.LogService.get]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly
DEBUG [com.mchange.v2.resourcepool.BasicResourcePool:1644] trace com.mchange.v2.resourcepool.BasicResourcePool@1368553 managed: 1, unused: 0, excluded: 0
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:202] Acquired Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@bbce54] for JDBC transaction
DEBUG [org.springframework.jdbc.datasource.DataSourceUtils:155] Setting JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@bbce54] read-only
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:219] Switching JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@bbce54] to manual commit
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:168] Bound value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] to thread [http-8777-1]
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:222] Initializing transaction synchronization
DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor:288] Getting transaction for [bj.n22.rms.log.service.LogService.get]
DEBUG [org.springframework.orm.ibatis.SqlMapClientTemplate:177] Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@d6999b] for iBATIS operation
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:140] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] bound to thread [http-8777-1]
DEBUG [java.sql.Connection:27] {conn-100012} Connection
DEBUG [org.springframework.orm.ibatis.SqlMapClientTemplate:194] Obtained JDBC Connection [Transaction-aware proxy for target Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@bbce54]] for iBATIS operation
DEBUG [java.sql.Connection:27] {conn-100012} Preparing Statement: select SEQ_PRIMARY.NEXTVAL from dual
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:140] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] bound to thread [http-8777-1]
DEBUG [java.sql.PreparedStatement:27] {pstm-100013} Executing Statement: select SEQ_PRIMARY.NEXTVAL from dual
DEBUG [java.sql.PreparedStatement:27] {pstm-100013} Parameters: []
DEBUG [java.sql.PreparedStatement:27] {pstm-100013} Types: []
DEBUG [java.sql.ResultSet:27] {rset-100014} ResultSet
DEBUG [java.sql.ResultSet:27] {rset-100014} Header: [NEXTVAL]
DEBUG [java.sql.ResultSet:27] {rset-100014} Result: [21]
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:140] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] bound to thread [http-8777-1]
DEBUG [org.springframework.orm.ibatis.SqlMapClientTemplate:177] Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@178d7b4] for iBATIS operation
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:140] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] bound to thread [http-8777-1]
DEBUG [java.sql.Connection:27] {conn-100015} Connection
DEBUG [org.springframework.orm.ibatis.SqlMapClientTemplate:194] Obtained JDBC Connection [Transaction-aware proxy for target Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@bbce54]] for iBATIS operation
DEBUG [java.sql.Connection:27] {conn-100015} Preparing Statement: insert into TEST_LOG (logid,username,logTime) values (?,?,?)
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:140] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] bound to thread [http-8777-1]
DEBUG [java.sql.PreparedStatement:27] {pstm-100016} Executing Statement: insert into TEST_LOG (logid,username,logTime) values (?,?,?)
DEBUG [java.sql.PreparedStatement:27] {pstm-100016} Parameters: [21, get, null]
DEBUG [java.sql.PreparedStatement:27] {pstm-100016} Types: [java.lang.Long, java.lang.String, null]
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:140] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] bound to thread [http-8777-1]
DEBUG [org.springframework.orm.ibatis.SqlMapClientTemplate:177] Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@17b4650] for iBATIS operation
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:140] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] bound to thread [http-8777-1]
DEBUG [java.sql.Connection:27] {conn-100017} Connection
DEBUG [org.springframework.orm.ibatis.SqlMapClientTemplate:194] Obtained JDBC Connection [Transaction-aware proxy for target Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@bbce54]] for iBATIS operation
DEBUG [java.sql.Connection:27] {conn-100017} Preparing Statement: select * from TEST_LOG where logid=?
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:140] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] bound to thread [http-8777-1]
DEBUG [java.sql.PreparedStatement:27] {pstm-100018} Executing Statement: select * from TEST_LOG where logid=?
DEBUG [java.sql.PreparedStatement:27] {pstm-100018} Parameters: [1]
DEBUG [java.sql.PreparedStatement:27] {pstm-100018} Types: [java.lang.Long]
DEBUG [java.sql.ResultSet:27] {rset-100019} ResultSet
DEBUG [java.sql.ResultSet:27] {rset-100019} Header: [LOGID, USERNAME, LOGTIME]
DEBUG [java.sql.ResultSet:27] {rset-100019} Result: [1, 测试new事物, null]
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:140] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] bound to thread [http-8777-1]
DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor:317] Completing transaction for [bj.n22.rms.log.service.LogService.get]
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:833] Triggering beforeCommit synchronization
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:846] Triggering beforeCompletion synchronization
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:660] Initiating transaction commit
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:259] Committing JDBC transaction on Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@bbce54]
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:859] Triggering afterCommit synchronization
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:875] Triggering afterCompletion synchronization
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:276] Clearing transaction synchronization
DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager:193] Removed value [org.springframework.jdbc.datasource.ConnectionHolder@1e701b0] for key [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15c8e1rol9i71bnat25|9a1621, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15c8e1rol9i71bnat25|9a1621, idleConnectionTestPeriod -> 1800, initialPoolSize -> 1, jdbcUrl -> jdbc:oracle:thin:@192.168.1.251:1521:orcl, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select * from dual, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] from thread [http-8777-1]
DEBUG [org.springframework.jdbc.datasource.DataSourceUtils:202] Resetting read-only flag of JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@bbce54]
DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager:314] Releasing JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@bbce54] after transaction
DEBUG [org.springframework.jdbc.datasource.DataSourceUtils:312] Returning JDBC Connection to DataSource
DEBUG [com.mchange.v2.resourcepool.BasicResourcePool:1644] trace com.mchange.v2.resourcepool.BasicResourcePool@1368553 managed: 1, unused: 0, excluded: 0
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory:389] No bean named 'org.apache.struts2.dispatcher.VelocityResult' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@103bc02: defining beans [dataSource,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,taxService,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,txAdvice,sqlMapClient,baseDao,logDao,logService]; root of factory hierarchy
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory:183] Ignoring constructor [public org.apache.struts2.dispatcher.VelocityResult(java.lang.String)] of bean 'org.apache.struts2.dispatcher.VelocityResult': org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.struts2.dispatcher.VelocityResult': Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory:1071] Not autowiring property 'velocityManager' of bean 'org.apache.struts2.dispatcher.VelocityResult' by name: no matching bean found
DEBUG [com.opensymphony.xwork2.util.InstantiatingNullHandler:72] Entering nullPropertyValue [target=[bj.n22.rms.log.vo.Log@1cb150a, bj.n22.rms.log.action.LogAction@296cf1, com.opensymphony.xwork2.DefaultTextProvider@14b0c98], property=message]
DEBUG [com.opensymphony.xwork2.util.InstantiatingNullHandler:72] Entering nullPropertyValue [target=[bj.n22.rms.log.vo.Log@1cb150a, bj.n22.rms.log.action.LogAction@296cf1, com.opensymphony.xwork2.DefaultTextProvider@14b0c98], property=message]
DEBUG [com.opensymphony.xwork2.util.InstantiatingNullHandler:72] Entering nullPropertyValue [target=[bj.n22.rms.log.vo.Log@1cb150a, bj.n22.rms.log.action.LogAction@296cf1, com.opensymphony.xwork2.DefaultTextProvider@14b0c98], property=struts_token]
DEBUG [com.opensymphony.xwork2.interceptor.I18nInterceptor:145] after Locale=zh_CN
DEBUG [com.opensymphony.xwork2.interceptor.I18nInterceptor:149] intercept }
DEBUG [com.mchange.v2.resourcepool.BasicResourcePool:1935] Checking for expired resources - Thu Mar 24 10:36:00 CST 2011 [com.mchange.v2.resourcepool.BasicResourcePool@1368553]
DEBUG [com.mchange.v2.resourcepool.BasicResourcePool:1447] BEGIN check for expired resources. [com.mchange.v2.resourcepool.BasicResourcePool@1368553]
DEBUG [com.mchange.v2.resourcepool.BasicResourcePool:1468] FINISHED check for expired resources. [com.mchange.v2.resourcepool.BasicResourcePool@1368553]

2个回答

嗯,你说的有一定的道理,我也看了一下下面的这个文章
http://webwork.iteye.com/blog/576529

要保证只读,需要设置数据库的用户的权限,这里的只读,只是在保证在事务方面进行优化

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐