dx幫忙::跨異構平臺的分散式事務處理.

bluegirl發表於2003-06-07
小妹初來貴地,還希望各位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給小妹出出主意,時間很緊迫.您如果有相似的經驗或者是在這方面有些經驗,還望不吝賜教!

.謝謝啦!!

相關文章