03-06-07 bluegirl










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.



2003-06-07 20:37



1. cookie解决,这个方案的好处是J2EE平台可以多个,他们都认识cookie,这是theServerSide.com采取的一个办法

2. Http session, 在分布式环境中,你可以考虑使用同种WEB容器,然后再分别调用不同的EJB容器.

3. statefull session bean,这适合同种EJB容器,不太适合你。




cookie和Http session值得一试验。


2003-06-08 11:25
Hi Dx,

You have picked a very interesting topic, though I can't see much value of it in real world and I don't have an answer for it, but it's good for brain exercise.

I think the key to your problem is XA, you need a single, distributed transaction across heterogenous systems. first let's take a look how you do the same action in a single/homogenous system.

you need call two ejbs from client, ejb does not need to be stateful but they must be in same transaction context. use UserTransaction and controlled it from client, that's no brainer. agree?

Now you want the second ejb lives in different system, the transaction manager from second one defintely need be attached or delegate control to first(primary) one. The suggestion you got from that expert basically is let jboss become another managed resource of websphere, so you pass the transaction context in second ejb call become recognized as it's still managed by same transaction manager.

Communicate with MBean remotely thru RMI is trivial once you figure out how to write that mbean, I believe you just have to dig into the websphere integration doc as any vendor who want to integrated with it would do the same thing. e.g Sonic MQ to websphere.

JCA maybe a wrong term here as it already carry a well known meaning, but you do need a implementation in similar pattern to work with another external resource, except it's being managed instead of managing position.

Now go back to the original point of usefulness, I never seen people want to get into trouble of scenario that you are pursuing, ( it's nice to stay in school ;-) )I do see people need to contact another app server from one server, actually I have done transaction routing myself but that's more like a nested/chain mode transaction usage, think about calling third party jms from ejb is a case as well.

Even you manage to make the simply case work as wanted,what happen when you do more things? let's assume you need to send a message(of course, within same tran), thought tran context maybe propogated thru threadlocal, but how can you sure the connection you get from JMS will be associated with that "remote" transaction manager? it may have problem even with XA jdbc connection, of course, this whole depends on jboss implementation.

You are using jboss 4 ? good luck. recently I can't resist the temptation to try out joss3.21, guess what, my topas server broken in many places, it took me almost a half day to figure out the places that's not compatible.

Brain machine is slowing down, so stop here.



2003-06-09 09:00






2003-06-09 09:22
JMS is the not solution to your problem, it's simply a reliable way to convey data, in your case a simple ejb call will do the same thing. If I understand you correctly, you need a 2pc on top of was and jboss. you can deliver a msg in transaction mode but the jms server in jboss still use its own TX manager.

10Go 1 2 3 4 ... 10 下一页