Topic: 跨服务器调用EJB的事务问题

  Print this page

1.跨服务器调用EJB的事务问题 Copy to clipboard
Posted by: skip
Posted on: 2006-04-30 14:04

A EJB->B EJB->C EJB
A、B在一台机 C在另外一台机 都是用WAS
A、C访问不同的数据库oracle
如果A中访问数据库的话,即使数据库操作没有问题也会抛 异常javax.transaction.TransactionRolledbackException(详见下面)。
如果A不访问数据库就很正常。
A、B、C都是使用容器管理事务

希望可以实现A数据库操作失败回滚,则C也回滚
事务类型应该怎样设置?

异常信息
javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
  org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: ; nested exception is:
  com.ibm.websphere.csi.CSITransactionRolledbackException: vmcid: 0x0 minor code: 0 completed: No
  at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemException(UtilDelegateImpl.java:214)
  at javax.rmi.CORBA.Util.mapSystemException(Util.java:84)
  at fejb._Third_Stub.makeSomeoneSayHello(_Third_Stub.java:248)
  at fejb.TestMain.main(TestMain.java:39)
Caused by: org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: ; nested exception is:
  com.ibm.websphere.csi.CSITransactionRolledbackException: vmcid: 0x0 minor code: 0 completed: No
  at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:729)
  at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:167)
  at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:564)
  at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3798)
  at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3620)
  at fejb.EJSRemoteStatelessThirdBean_6e00e829.makeSomeoneSayHello(Unknown Source)
  at fejb._EJSRemoteStatelessThirdBean_6e00e829_Tie.makeSomeoneSayHello(_EJSRemoteStatelessThirdBean_6e00e829_Tie.java:152)
  at fejb._EJSRemoteStatelessThirdBean_6e00e829_Tie._invoke(_EJSRemoteStatelessThirdBean_6e00e829_Tie.java:92)
  at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:608)
  at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:461)
  at com.ibm.rmi.iiop.ORB.process(ORB.java:432)
  at com.ibm.CORBA.iiop.ORB.process(ORB.java:1728)
  at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2229)
  at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:65)
  at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923