Hi,
I'm not an EJB expert. So I'm trying to migrate the following code from weblogic to glassfish.
import weblogic.transaction.Transaction;
import weblogic.transaction.TransactionManager;
.....
try
{
Context context = new InitialContext();
TransactionManager tm = (TransactionManager)context
.lookup( "weblogic.transaction.TransactionManager" );
Transaction transaction = (Transaction)tm.getTransaction();
transactionId = Hex.encode( transaction.getXid().getGlobalTransactionId() );
}
So this is what I did:
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
.............
TransactionManager tm=context.lookup("java:appserver/TransactionManager");
Transaction transaction = (Transaction)tm.getTransaction();
I don't know how to proceed from this point as the javax.transaction.Transaction interface doesn't have a getXid() method.
Thanks
Suneel
[Message sent by forum member 'suneelgv' (suneelgv)]
http://forums.java.net/jive/thread.jspa?messageID=296026