What you are asking for is a very complicated multi-server transaction system that can't be easily described in a small forum post. Besides which, no one is going to design such a thing for you.
I don't believe that remote EJB invocations support XA semantics, and there is no way to get access to the XAResource object, even if you could somehow bridge it across the two servers. You would really be better off running this on one server.
You should read the specs on JCA, JTA and JTS which are at java.sun.com, the X/Open XA specifcation which is at www.opengroup.org, along with the OSI DTP Model which is also at www.opengroup.org.
Actually, after reading on of the other threads where you have asked this exact same question, warjort has already given you an answer. Check his last post in this thread:
Now i only want to know if i compile a jca adapter ,what classes are nessesary.
Now i don't process the transaction and security.
and only connection.
and i just call the method test() of the remote EJB.
that is i will create an adapter for EJB.
and the record input and output are not used.
I compile the connection adapter,but when i deploy it .there is wrong message.
I attach the adapter ,and i hope someone can help me look it ,and tell me what's wrong it?