[Seasar-user:11531] Re: requiresNewTxにてcommit時に例外が発生した場合にRollbackされない
鈴木 順
[E-MAIL ADDRESS DELETED]
2007年 11月 7日 (水) 23:24:24 JST
小林さん
お世話になっております。鈴木です。
一応こちらで取ったデバッグ文を送付します。
S2SessionFactoryImpl::bindSession->createSession
の発生回数が違います。
TOMCATの場合はちゃんと入れ子っぽく動るように思われます。
SQL文とある部分はHibernateが大量に
SQLを実行したログを出力しています。
尚、多少時間がかかってしまう点は、問題ありません。
しかしRequierNewを外すのは厳しい状況です。
■TOMCATの場合
2007-11-07 22:19:34,984 [http-8080-Processor23] INFO jp.co.worksap.common.s2.S2SessionFactoryImpl - S2SessionFactoryImpl::bindSession->createSession.tx=[FormatId=4360, GlobalId=1194441222625/10, BranchId=]
2007-11-07 22:19:34,984 [http-8080-Processor23] INFO jp.co.worksap.common.s2.S2SessionFactoryImpl - S2SessionFactoryImpl::getConnection.ThreadId=38
SQL文
2007-11-07 22:19:35,250 [http-8080-Processor23] INFO jp.co.worksap.common.s2.S2SessionFactoryImpl - S2SessionFactoryImpl::bindSession->createSession.tx=[FormatId=4360, GlobalId=1194441222625/11, BranchId=]
2007-11-07 22:19:35,250 [http-8080-Processor23] INFO jp.co.worksap.common.s2.S2SessionFactoryImpl - S2SessionFactoryImpl::getConnection.ThreadId=38
SQL文
2007-11-07 22:19:35,343 [http-8080-Processor23] INFO jp.co.worksap.common.s2.S2SessionFactoryImpl - S2SessionFactoryImpl::FlushSession.tx=[FormatId=4360, GlobalId=1194441222625/11, BranchId=]
SQL文(UPDATE/INSERT)
2007-11-07 22:19:35,359 [http-8080-Processor23] INFO jp.co.worksap.common.s2.S2SessionFactoryImpl - S2SessionFactoryImpl::closeSession.tx=[FormatId=4360, GlobalId=1194441222625/11, BranchId=]
2007-11-07 22:19:35,562 [http-8080-Processor23] INFO jp.co.worksap.common.s2.S2SessionFactoryImpl - S2SessionFactoryImpl::FlushSession.tx=[FormatId=4360, GlobalId=1194441222625/10, BranchId=]
2007-11-07 22:19:35,578 [http-8080-Processor23] INFO jp.co.worksap.common.s2.S2SessionFactoryImpl - S2SessionFactoryImpl::closeSession.tx=[FormatId=4360, GlobalId=1194441222625/10, BranchId=]
■WASの場合
[07/11/07 21:19:32:203 JST] 0000003c S2SessionFact I jp.co.worksap.common.s2.S2SessionFactoryImpl bindSession S2SessionFactoryImpl::bindSession->createSession.tx=[E-MAIL ADDRESS DELETED]
[07/11/07 21:19:32:203 JST] 0000003c S2SessionFact I jp.co.worksap.common.s2.S2SessionFactoryImpl getConnection S2SessionFactoryImpl::getConnection.ThreadId=1
SQL文
[07/11/07 21:19:32:297 JST] 0000003c ConnectionMan E J2CA0058E: ConnectionManager は、リソース jdbc/cimTestXA に対して、接続 [E-MAIL ADDRESS DELETED] を ManagedConnection MCWrapper id 6152d0ce Managed connection [E-MAIL ADDRESS DELETED] State:STATE_TRAN_WRAPPER_INUSE
と関連付けることができませんでした。 例外を受け取りました: javax.resource.ResourceException: Current UOW does not match the UOW with which the ManagedConnection is already enlisted.
at com.ibm.ejs.j2c.ConnectionManager.reAssociate(ConnectionManager.java:1612)
at com.ibm.ejs.j2c.HandleList.reAssociate(HandleList.java:354)
at com.ibm.ejs.j2c.ConnectionHandleManager.userTranBegin(ConnectionHandleManager.java:310)
at com.ibm.ejs.j2c.LTCHandleCollaborator.transactionPostBegin(LTCHandleCollaborator.java:163)
at com.ibm.ejs.j2c.LTCHandleCollaborator.contextChange(LTCHandleCollaborator.java:104)
at com.ibm.ws.LocalTransaction.LTCCallbacks.contextChange(LTCCallbacks.java:136)
at com.ibm.ws.LocalTransaction.LTCUOWCallback.contextChange(LTCUOWCallback.java:166)
at com.ibm.ws.uow.UOWScopeCallbackManager.notifyCallbacks(UOWScopeCallbackManager.java:62)
at com.ibm.ws.Transaction.JTA.UserTransactionImpl.begin(UserTransactionImpl.java:180)
at com.ibm.ws.uow.UOWManagerImpl.uowBegin(UOWManagerImpl.java:1133)
at com.ibm.ws.uow.UOWManagerImpl.runUnderNewUOW(UOWManagerImpl.java:957)
at com.ibm.ws.uow.UOWManagerImpl.runUnderUOW(UOWManagerImpl.java:506)
at org.seasar.extension.tx.adapter.WAS6TransactionManagerAdapter.executeCallback(WAS6TransactionManagerAdapter.java:123)
at org.seasar.extension.tx.adapter.WAS6TransactionManagerAdapter.requiresNew(WAS6TransactionManagerAdapter.java:72)
at org.seasar.extension.tx.RequiresNewInterceptor.invoke(RequiresNewInterceptor.java:41)
at jp.co.worksap.cim.web.criteria.page.CriteriaListPage$$EnhancedByS2AOP$$651b10da$$MethodInvocation$$showConfirmPersonListAction4.proceed(MethodInvocationClassGenerator.java)
at jp.co.worksap.cim.web.criteria.page.CriteriaListPage$$EnhancedByS2AOP$$651b10da.showConfirmPersonListAction(CriteriaListPage$$EnhancedByS2AOP$$651b10da.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.seasar.teeda.core.el.impl.MethodBindingImpl.invoke(MethodBindingImpl.java:70)
at org.seasar.jsf.util.InvokeUtil.invokeInternal(InvokeUtil.java:92)
at org.seasar.jsf.util.InvokeUtil.invoke(InvokeUtil.java:72)
at org.seasar.jsf.application.ActionListenerImpl.processAction(ActionListenerImpl.java:65)
at javax.faces.component.UICommand.broadcast(UICommand.java:149)
at jp.co.worksap.common.jsfui.abstable.AbsTable.broadcast(AbsTable.java:357)
at org.seasar.jsf.component.S2UIViewRoot.broadcastForPhase(S2UIViewRoot.java:119)
at org.seasar.jsf.component.S2UIViewRoot.processApplication(S2UIViewRoot.java:90)
at org.seasar.jsf.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:177)
at org.seasar.jsf.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:108)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:92)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1521)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:136)
at jp.co.worksap.cim.webapp.AuthenticationFilter.doFilter(AuthenticationFilter.java:62)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at org.seasar.hibernate3.filter.FilterChainTxImpl.doFilter(FilterChainTxImpl.java:31)
at org.seasar.hibernate3.filter.FilterChainTxImpl$$EnhancedByS2AOP$$444110cf.$$doFilter$$invokeSuperMethod$$(FilterChainTxImpl$$EnhancedByS2AOP$$444110cf.java)
at org.seasar.hibernate3.filter.FilterChainTxImpl$$EnhancedByS2AOP$$444110cf$$MethodInvocation$$doFilter0.proceed(MethodInvocationClassGenerator.java)
at org.seasar.extension.tx.DefaultTransactionCallback.execute(DefaultTransactionCallback.java:58)
at org.seasar.extension.tx.adapter.WAS6TransactionManagerAdapter$UOWActionImpl.run(WAS6TransactionManagerAdapter.java:167)
at com.ibm.ws.uow.UOWManagerImpl.runUnderNewUOW(UOWManagerImpl.java:969)
at com.ibm.ws.uow.UOWManagerImpl.runUnderUOW(UOWManagerImpl.java:506)
at org.seasar.extension.tx.adapter.WAS6TransactionManagerAdapter.executeCallback(WAS6TransactionManagerAdapter.java:123)
at org.seasar.extension.tx.adapter.WAS6TransactionManagerAdapter.required(WAS6TransactionManagerAdapter.java:67)
at org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:41)
at org.seasar.hibernate3.filter.FilterChainTxImpl$$EnhancedByS2AOP$$444110cf$$MethodInvocation$$doFilter0.proceed(MethodInvocationClassGenerator.java)
at org.seasar.hibernate3.filter.FilterChainTxImpl$$EnhancedByS2AOP$$444110cf.doFilter(FilterChainTxImpl$$EnhancedByS2AOP$$444110cf.java)
at org.seasar.hibernate3.filter.OpenSessionInViewFilter.doFilter(OpenSessionInViewFilter.java:21)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at jp.co.worksap.cwf.client.filter.AsyncSoapExecuteFilter.doFilter(AsyncSoapExecuteFilter.java:30)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at org.seasar.extension.filter.EncodingFilter.doFilter(EncodingFilter.java:69)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:77)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:759)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:89)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1936)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:114)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)
[07/11/07 21:19:32:391 JST] 0000003c HandleList W PARK_OR_REASSOCIATE_FAILED_W_J2CA0083
[07/11/07 21:19:32:766 JST] 0000003c S2SessionFact I jp.co.worksap.common.s2.S2SessionFactoryImpl$SynchronizationImpl beforeCompletion S2SessionFactoryImpl::FlushSession.tx=[E-MAIL ADDRESS DELETED]
[07/11/07 21:19:32:781 JST] 0000003c S2SessionFact I jp.co.worksap.common.s2.S2SessionFactoryImpl$SynchronizationImpl afterCompletion S2SessionFactoryImpl::closeSession.tx=[E-MAIL ADDRESS DELETED]
Seasar-user メーリングリストの案内