Java 未提交aop事务配置的Spring jdbc

Java 未提交aop事务配置的Spring jdbc,java,spring,spring-aop,Java,Spring,Spring Aop,我在Tomcat6和JDK1.6中使用Spring3.0.6。我已经使用Spring引用将SpringJDBC配置为声明性事务。我在删除查询的日志中看到以下内容,但在执行之后,记录不会被删除。你知道原因是什么吗 Creating new transaction with name [com.accept.web.modules.personalization.UserPreferencesServiceImpl.delete]: PROPAGATION_REQUIRED,ISOLATION_DE

我在Tomcat6和JDK1.6中使用Spring3.0.6。我已经使用Spring引用将SpringJDBC配置为声明性事务。我在删除查询的日志中看到以下内容,但在执行之后,记录不会被删除。你知道原因是什么吗

Creating new transaction with name [com.accept.web.modules.personalization.UserPreferencesServiceImpl.delete]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
Acquired Connection [ProxyConnection[PooledConnection[oracle.jdbc.driver.T4CConnection@73bddb4e]]] for JDBC transaction
Bound value [org.springframework.jdbc.datasource.ConnectionHolder@3f6f1ea2] for key [org.apache.tomcat.jdbc.pool.DataSource@1123065c{ConnectionPool[defaultAutoCommit=null; defaultReadOnly=null; defaultTransactionIsolation=-1; defaultCatalog=null; driverClassName=oracle.jdbc.OracleDriver; maxActive=30; maxIdle=3; minIdle=0; initialSize=0; maxWait=30000; testOnBorrow=false; testOnReturn=false; timeBetweenEvictionRunsMillis=600000; numTestsPerEvictionRun=0; minEvictableIdleTimeMillis=1800000; testWhileIdle=true; testOnConnect=false; password=accept; url=jdbc:oracle:thin:@bbhangale-pc:1521/bbhangale; username=accept; validationQuery=select name from usr_user where id=104; validationInterval=1200000; accessToUnderlyingConnectionAllowed=true; removeAbandoned=true; removeAbandonedTimeout=360; logAbandoned=true; connectionProperties=null; initSQL=null; jdbcInterceptors=null; jmxEnabled=true; fairQueue=true; useEquals=true; abandonWhenPercentageFull=0; maxAge=0; useLock=false; dataSource=null; dataSourceJNDI=null; alternateUsernameAllowed=false; }] to thread [http-8001-1]
Initializing transaction synchronization
Getting transaction for [com.accept.web.modules.personalization.UserPreferencesServiceImpl.delete]
Executing prepared SQL update
Executing prepared SQL statement [SELECT "KEY", "VALUE" FROM config WHERE "KEY" IN (?) AND user_id = ?]
Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@3f6f1ea2] for key [org.apache.tomcat.jdbc.pool.DataSource@1123065c{ConnectionPool[defaultAutoCommit=null; defaultReadOnly=null; defaultTransactionIsolation=-1; defaultCatalog=null; driverClassName=oracle.jdbc.OracleDriver; maxActive=30; maxIdle=3; minIdle=0; initialSize=0; maxWait=30000; testOnBorrow=false; testOnReturn=false; timeBetweenEvictionRunsMillis=600000; numTestsPerEvictionRun=0; minEvictableIdleTimeMillis=1800000; testWhileIdle=true; testOnConnect=false; password=accept; url=jdbc:oracle:thin:@bbhangale-pc:1521/bbhangale; username=accept; validationQuery=select name from usr_user where id=104; validationInterval=1200000; accessToUnderlyingConnectionAllowed=true; removeAbandoned=true; removeAbandonedTimeout=360; logAbandoned=true; connectionProperties=null; initSQL=null; jdbcInterceptors=null; jmxEnabled=true; fairQueue=true; useEquals=true; abandonWhenPercentageFull=0; maxAge=0; useLock=false; dataSource=null; dataSourceJNDI=null; alternateUsernameAllowed=false; }] bound to thread [http-8001-1]
Setting SQL statement parameter value: column index 1, parameter value [FILTER_rcaGrid], value class [java.lang.String], SQL type unknown
Setting SQL statement parameter value: column index 2, parameter value [107], value class [java.lang.Integer], SQL type unknown
Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@3f6f1ea2] for key [org.apache.tomcat.jdbc.pool.DataSource@1123065c{ConnectionPool[defaultAutoCommit=null; defaultReadOnly=null; defaultTransactionIsolation=-1; defaultCatalog=null; driverClassName=oracle.jdbc.OracleDriver; maxActive=30; maxIdle=3; minIdle=0; initialSize=0; maxWait=30000; testOnBorrow=false; testOnReturn=false; timeBetweenEvictionRunsMillis=600000; numTestsPerEvictionRun=0; minEvictableIdleTimeMillis=1800000; testWhileIdle=true; testOnConnect=false; password=accept; url=jdbc:oracle:thin:@bbhangale-pc:1521/bbhangale; username=accept; validationQuery=select name from usr_user where id=104; validationInterval=1200000; accessToUnderlyingConnectionAllowed=true; removeAbandoned=true; removeAbandonedTimeout=360; logAbandoned=true; connectionProperties=null; initSQL=null; jdbcInterceptors=null; jmxEnabled=true; fairQueue=true; useEquals=true; abandonWhenPercentageFull=0; maxAge=0; useLock=false; dataSource=null; dataSourceJNDI=null; alternateUsernameAllowed=false; }] bound to thread [http-8001-1]
SQL update affected 1 rows
Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@3f6f1ea2] for key [org.apache.tomcat.jdbc.pool.DataSource@1123065c{ConnectionPool[defaultAutoCommit=null; defaultReadOnly=null; defaultTransactionIsolation=-1; defaultCatalog=null; driverClassName=oracle.jdbc.OracleDriver; maxActive=30; maxIdle=3; minIdle=0; initialSize=0; maxWait=30000; testOnBorrow=false; testOnReturn=false; timeBetweenEvictionRunsMillis=600000; numTestsPerEvictionRun=0; minEvictableIdleTimeMillis=1800000; testWhileIdle=true; testOnConnect=false; password=accept; url=jdbc:oracle:thin:@bbhangale-pc:1521/bbhangale; username=accept; validationQuery=select name from usr_user where id=104; validationInterval=1200000; accessToUnderlyingConnectionAllowed=true; removeAbandoned=true; removeAbandonedTimeout=360; logAbandoned=true; connectionProperties=null; initSQL=null; jdbcInterceptors=null; jmxEnabled=true; fairQueue=true; useEquals=true; abandonWhenPercentageFull=0; maxAge=0; useLock=false; dataSource=null; dataSourceJNDI=null; alternateUsernameAllowed=false; }] bound to thread [http-8001-1]
Completing transaction for [com.accept.web.modules.personalization.UserPreferencesServiceImpl.delete]
Triggering beforeCommit synchronization
Triggering beforeCompletion synchronization
Initiating transaction commit
Committing JDBC transaction on Connection [ProxyConnection[PooledConnection[oracle.jdbc.driver.T4CConnection@73bddb4e]]]
Triggering afterCommit synchronization
Triggering afterCompletion synchronization
Clearing transaction synchronization
Removed value [org.springframework.jdbc.datasource.ConnectionHolder@3f6f1ea2] for key [org.apache.tomcat.jdbc.pool.DataSource@1123065c{ConnectionPool[defaultAutoCommit=null; defaultReadOnly=null; defaultTransactionIsolation=-1; defaultCatalog=null; driverClassName=oracle.jdbc.OracleDriver; maxActive=30; maxIdle=3; minIdle=0; initialSize=0; maxWait=30000; testOnBorrow=false; testOnReturn=false; timeBetweenEvictionRunsMillis=600000; numTestsPerEvictionRun=0; minEvictableIdleTimeMillis=1800000; testWhileIdle=true; testOnConnect=false; password=accept; url=jdbc:oracle:thin:@bbhangale-pc:1521/bbhangale; username=accept; validationQuery=select name from usr_user where id=104; validationInterval=1200000; accessToUnderlyingConnectionAllowed=true; removeAbandoned=true; removeAbandonedTimeout=360; logAbandoned=true; connectionProperties=null; initSQL=null; jdbcInterceptors=null; jmxEnabled=true; fairQueue=true; useEquals=true; abandonWhenPercentageFull=0; maxAge=0; useLock=false; dataSource=null; dataSourceJNDI=null; alternateUsernameAllowed=false; }] from thread [http-8001-1]
Releasing JDBC Connection [ProxyConnection[PooledConnection[oracle.jdbc.driver.T4CConnection@73bddb4e]]] after transaction
Returning JDBC Connection to DataSource

现在一切正常。我忘记将查询更改为删除查询。正如您所指出的,您在日志中看不到任何delete查询。

我在您的日志中看不到delete语句。请显示删除记录的代码。@tob是对的!请发布处理删除内容的代码。。。正如danny.lesnik所说,接受你之前(6)个问题的一些答案。。