dx帮忙::跨异构平台的分布式事务处理.
小妹初来贵地,还希望各位dx多多指教!
现有一个问题想请教大家:
我的应用服务器WSAD5.0和jboss4.0.0
DBMS:oracle9i和db2.
现在的想实现的功能是websphere中调用一个ejb,实现从oracle中取出100$,然后调用jboss上部署的一个
ejb,实现把100$放到db2中.
这个过程不用RMI/IIOP来做,而是想通过一个分布式事务处理,两阶段提交来完成.
而导师让我用基于jca的理论来做一个适配器来实现.也就是这个适配器要能够实现分布式事务处理.
jboss的专家曾经建议我要在jboss中添加一些jboss的远程框架的mbean,然后实现分布式调用,他的建议如
下:
To propagate the websphere transaction to jboss, you will need to write your own transaction manager
service mbean that provides the websphere transaction manager instead of creating a jboss
transaction manager. You will need to make sure your mbean is installed before you do any jndi
lookups of jboss ejbs. From the client side jboss framework installed when you look up an ejb in jndi,
the TransactionInterceptor and the DTXAResourceInterceptor need to get the transaction manager
from an mbean. For normal clients this mbean is the jboss TransactionManagerService mbean.You
need to make sure there is an mbean server running in websphere, either one that IBM provides or by
using the JBoss one set up by the
org.jboss.system.client.Client class, and install a different
TransactionManagerService mbean that supplies the ibm transaction
manager.Study how remote ejb invocation works. Basically the proxy constructs an Invocation object
which has various context information added to it, and then is sent to the server. There are actually 2
styles of Invocation object: the ejb Invocation gets put into a remoting InvocationRequest object. Your
adapter has to do the same thing. You need to add transaction information and security information.
Look at what the TransactionInterceptor and DTXAResourceInterceptor do, along
with the EjbToRemotingAdapter.
但是我jca开发和jmx,和跨平台分布式事务处理方面没有什么经验,所以请各位dx给小妹出出主意,时间很紧迫.您如果有相似的经验或者是在这方面有些经验,还望不吝赐教!
.谢谢啦!!