我正在weblogic中模拟一个场景,以查看使用Spring 4在我们的项目中jta的工作方式。 意识到如果发生事务超时,我在该事务边界中的应用程序更新语句仍会有趣地提交。
逻辑化是在与TOAD一样的单独应用中使用行锁,在应用程序中发生事务超时后,在TOAD中释放带有commit的锁,并希望应用程序侧也回滚。
正在发生的事情是应用程序按照日志回滚,但已提交数据库更新。
使用weblogic数据源,禁用全局事务。 jdbc类是: oracle.jdbc.OracleDriver
config.xml
<tx:annotation-driven/>
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/UNICA_TCODS_NONXA"/>
<bean id="txManager" class="org.springframework.transaction.jta.JtaTransactionManager" />
config.java:
@EnableTransactionManagement
@Configuration
public class AppConfig {
@Autowired
DataSource dataSource;
@Bean
public GetInterestListServiceImpl getInterestListService() {
return new GetInterestListServiceImpl(dataSource);
}
}
服务就像:
@Service("GetInterestListService")
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
public class GetInterestListServiceImpl implements GetInterestListService {
private static final Logger logger = MnSLogger.getLogger(GetInterestListServiceImpl.class.getName());
private DataSource dataSource;
private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
public GetInterestListServiceImpl(DataSource dataSource) {
this.dataSource = dataSource;
JdbcTemplate template = new JdbcTemplate(dataSource);
this.namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(template);
}
@Transactional(readOnly = false, propagation = Propagation.REQUIRED, rollbackFor=Exception.class)
@Override
public GetInterestListResponse getInterestList(String clientTID,String ffid, String lang) {
SqlParameterSource namedParametersForGetCampaign = new MapSqlParameterSource("s", lang);
String sqll = "UPDATE "+ffid+" CSB SET IMAGE_URL_TR=:s";
System.out.println("sqll = " + sqll);
int rowCount = this.namedParameterJdbcTemplate.update(sqll, namedParametersForGetCampaign);
System.out.println("rowCount = " + rowCount);
首先,将更新语句发送到此表,并在没有提交的情况下等待,以有意地等待应用程序 sql: UPDATE lock1 SET IMAGE_URL_TR ='www.google.com.tr';
调用服务以在应用程序端开始事务
####<Dec 29, 2018 5:28:04 PM EET> <Debug> <JTA2PC> <uatosb01v> <<anonymous>> <> <> <1546093684026> <BEA-000000> <java.lang.Exception: DEBUG: Xid=BEA1-001D812805B0(882519654),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=-1546093684) wakeUpAfterSeconds(30)
at weblogic.transaction.internal.TxDebug.debugStack(TxDebug.java:60)
at weblogic.transaction.internal.TransactionImpl.wakeUpAfterSeconds(TransactionImpl.java:2015)
at weblogic.transaction.internal.TransactionImpl.init(TransactionImpl.java:279)
at weblogic.transaction.internal.TransactionImpl.<init>(TransactionImpl.java:254)
at weblogic.transaction.internal.ServerTransactionImpl.<init>(ServerTransactionImpl.java:196)
at weblogic.transaction.internal.ServerTransactionManagerImpl.createTransaction(ServerTransactionManagerImpl.java:2022)
at weblogic.transaction.internal.ServerTransactionManagerImpl.createTransaction(ServerTransactionManagerImpl.java:2004)
at weblogic.transaction.internal.TransactionManagerImpl.internalBegin(TransactionManagerImpl.java:254)
at weblogic.transaction.internal.ServerTransactionManagerImpl.internalBegin(ServerTransactionManagerImpl.java:360)
at weblogic.transaction.internal.ServerTransactionManagerImpl.begin(ServerTransactionManagerImpl.java:335)
at weblogic.transaction.internal.TransactionManagerImpl.internalBegin(TransactionManagerImpl.java:223)
at weblogic.transaction.internal.TransactionManagerImpl.begin(TransactionManagerImpl.java:186)
at org.springframework.transaction.jta.JtaTransactionManager.doJtaBegin(JtaTransactionManager.java:874)
at org.springframework.transaction.jta.JtaTransactionManager.doBegin(JtaTransactionManager.java:831)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:447)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:277)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy216.getInterestList(Unknown Source)
at com.xyz1.crm.unicamobilegateway.controller.UnicaMobileGatewayRestController.getInterestList(UnicaMobileGatewayRestController.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3732)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
开始尝试运行该语句。
####<Dec 29, 2018 5:28:04 PM EET> <Debug> <JDBCInternal> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093684040> <BEA-000000> < > CE:getCS (10) isCallable = false, sql = UPDATE LOCK1 CSB SET IMAGE_URL_TR=?, resultSetType = -1, resultSetConcurrency = -1, resultSetHoldability = -1, autoGeneratedKeys = -1, columnIndexes = null, columnNames = null>
####<Dec 29, 2018 5:28:04 PM EET> <Debug> <JDBCInternal> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093684040> <BEA-000000> < CE:getCS (25) key = false:UPDATE LOCK1 CSB SET IMAGE_URL_TR=?:-1:-1:-1:-1:null:null>
####<Dec 29, 2018 5:28:04 PM EET> <Debug> <JDBCInternal> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093684040> <BEA-000000> < CE:getCS (30) entry = weblogic.jdbc.common.internal.StatementHolder@6423995f>
####<Dec 29, 2018 5:28:04 PM EET> <Debug> <JDBCInternal> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093684040> <BEA-000000> << CE:getCS (100.2) entry = weblogic.jdbc.common.internal.StatementHolder@6423995f>
由于JTA超时为30,我可以看到事务已回滚
####<Dec 29, 2018 5:28:38 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093718444> <BEA-000000> <java.lang.Exception: DEBUG: Xid=BEA1-001D812805B0(882519654),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=34,seconds left=-4,activeThread=Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],SCInfo[xyzdomain+sideAppServer1]=(state=active),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=sideAppServer1+192.168.244.76:10004+xyzdomain+t3+, XAResources={WSATGatewayRM_sideAppServer1_xyzdomain},NonXAResources={})]) wakeUpAfterSeconds(30)
at weblogic.transaction.internal.TxDebug.debugStack(TxDebug.java:60)
at weblogic.transaction.internal.TransactionImpl.wakeUpAfterSeconds(TransactionImpl.java:2015)
at weblogic.transaction.internal.ServerTransactionImpl.wakeUp(ServerTransactionImpl.java:1772)
at weblogic.transaction.internal.ServerTransactionManagerImpl.processTimedOutTransactions(ServerTransactionManagerImpl.java:1676)
at weblogic.transaction.internal.TransactionManagerImpl.wakeUp(TransactionManagerImpl.java:1988)
at weblogic.transaction.internal.ServerTransactionManagerImpl.wakeUp(ServerTransactionManagerImpl.java:1586)
at weblogic.transaction.internal.WLSTimer.timerExpired(WLSTimer.java:35)
at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
>
####<Dec 29, 2018 5:28:38 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093718444> <BEA-000000> <java.lang.Exception: DEBUG: Xid=BEA1-001D812805B0(882519654),Status=Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 34 seconds
BEA1-001D812805B0],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=34,seconds left=30,activeThread=Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],SCInfo[xyzdomain+sideAppServer1]=(state=active),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=sideAppServer1+192.168.244.76:10004+xyzdomain+t3+, XAResources={WSATGatewayRM_sideAppServer1_xyzdomain},NonXAResources={})]) wakeUpAfterSeconds(30)
>
####<Dec 29, 2018 5:28:38 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093718445> <BEA-000000> <java.lang.Exception: DEBUG: Xid=BEA1-001D812805B0(882519654),Status=Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 34 seconds
BEA1-001D812805B0],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=34,seconds left=30,activeThread=Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],SCInfo[xyzdomain+sideAppServer1]=(state=active),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=sideAppServer1+192.168.244.76:10004+xyzdomain+t3+, XAResources={WSATGatewayRM_sideAppServer1_xyzdomain},NonXAResources={})]) wakeUpAfterSeconds(10)
>
####<Dec 29, 2018 5:28:48 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093728448> <BEA-000000> <wakeUp runing: Xid=BEA1-001D812805B0(882519654),Status=Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 34 seconds
BEA1-001D812805B0],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=44,seconds left=0,activeThread=Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],SCInfo[xyzdomain+sideAppServer1]=(state=active),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=sideAppServer1+192.168.244.76:10004+xyzdomain+t3+, XAResources={WSATGatewayRM_sideAppServer1_xyzdomain},NonXAResources={})])>
####<Dec 29, 2018 5:28:48 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093728448> <BEA-000000> <java.lang.Exception: DEBUG: Xid=BEA1-001D812805B0(882519654),Status=Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 34 seconds
BEA1-001D812805B0],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=44,seconds left=0,activeThread=Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],SCInfo[xyzdomain+sideAppServer1]=(state=active),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=sideAppServer1+192.168.244.76:10004+xyzdomain+t3+, XAResources={WSATGatewayRM_sideAppServer1_xyzdomain},NonXAResources={})]) wakeUpAfterSeconds(30)
>
####<Dec 29, 2018 5:28:48 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093728449> <BEA-000000> <BEA1-001D812805B0: null: ServerTransactionImpl.globalRollback()>
####<Dec 29, 2018 5:28:48 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093728449> <BEA-000000> <BEA1-001D812805B0: null: TX[BEA1-001D812805B0] active-->rolling back
java.lang.Exception: DEBUG
>
####<Dec 29, 2018 5:28:48 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093728449> <BEA-000000> <ServerSCInfo.startRollback: Xid=BEA1-001D812805B0(882519654),Status=Rolling Back. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 34 seconds
BEA1-001D812805B0],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=44,seconds left=30,activeThread=Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],SCInfo[xyzdomain+sideAppServer1]=(state=active),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=sideAppServer1+192.168.244.76:10004+xyzdomain+t3+, XAResources={WSATGatewayRM_sideAppServer1_xyzdomain},NonXAResources={})])>
####<Dec 29, 2018 5:28:48 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093728449> <BEA-000000> <SC[xyzdomain+sideAppServer1] active-->rolledback
java.lang.Exception: DEBUG
>
####<Dec 29, 2018 5:28:48 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093728449> <BEA-000000> <BEA1-001D812805B0: null: TX[BEA1-001D812805B0] rolling back-->rolled back
java.lang.Exception: DEBUG
>
####<Dec 29, 2018 5:28:48 PM EET> <JTA2PC> <uatosb01v> <sideAppServer1> <[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1546093728449> <BEA-000000> <BEA1-001D812805B0: null: releaseLog>
在TOAD中提交事务以推进应用程序声明 通过提交释放TOAD事务后,应用程序还会尝试运行更新。最有趣的是,下面的更新语句使用事务“ BEA1-001D812805B0”执行最近回滚的语句。
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCSQL> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771924> <BEA-000000> <[weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper@3b] executeUpdate returns 7>
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCSQL> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771925> <BEA-000000> <[weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper@3b] getWarnings()>
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCSQL> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771925> <BEA-000000> <[weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper@3b] getWarnings returns>
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCSQL> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771927> <BEA-000000> <[weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper@3b] close()>
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCInternal> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771927> <BEA-000000> < > CE:retCS (10) entry = weblogic.jdbc.common.internal.StatementHolder@6423995f>
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCInternal> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771927> <BEA-000000> < CE:retCS (20) key = false:UPDATE LOCK1 CSB SET IMAGE_URL_TR=?:-1:-1:-1:-1:null:null>
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCInternal> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771927> <BEA-000000> < < CE:retCS (100) >
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCSQL> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771928> <BEA-000000> <[weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper@3b] close returns>
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCSQL> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771928> <BEA-000000> <[weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection@3a] close()>
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCConn> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771928> <BEA-000000> <ConnectionEnv.cleanup, jconn=oracle.jdbc.driver.T4CConnection@2bc8d34, isXA=false, isJTS=false, jconn.isolationLevel=2, initialIsolationLevel=2, dirtyIsolationLevel=false>
####<Dec 29, 2018 5:29:31 PM EET> <Debug> <JDBCSQL> <uatosb01v> <<anonymous>> <BEA1-001D812805B0> <> <1546093771929> <BEA-000000> <[weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection@3a] close returns>
weblogic.out
2018-12-29 17:28:04,025 DEBUG [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] support.AbstractPlatformTransactionManager (AbstractPlatformTransactionManager.java:367) - Creating new transaction with name [com.xyz1.crm.unicamobilegateway.service.impl.GetInterestListServiceImpl.getInterestList]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; '',-java.lang.Exception
sqll = UPDATE LOCK1 CSB SET IMAGE_URL_TR=:s
rowCount = 7
2018-12-29 17:29:31,929 DEBUG [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] support.AbstractPlatformTransactionManager (AbstractPlatformTransactionManager.java:759) - Initiating transaction commit
org.springframework.transaction.UnexpectedRollbackException: JTA transaction already rolled back (probably due to a timeout)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1021)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:504)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:292)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy216.getInterestList(Unknown Source)
答案 0 :(得分:0)
。从头开始安装新的weblogic 10.3.6(11g),我发现weblogic存在问题。
如果存在xa数据源,则weblogic可以在JTA事务中管理此数据源。 如果存在本地数据源,则无论是否以任何方式支持全局事务,weblogic都无法在JTA中管理数据源事务。
存在一个Weblogic JTA事务管理器问题。