TransactionImple tx = TxImporter.getImportedTransaction(xid);
if (tx == null)
throw new XAException(XAException.XAER_INVAL);
switch (tx.doPrepare())
{
case TwoPhaseOutcome.PREPARE_READONLY:
TxImporter.removeImportedTransaction(xid);
return XAResource.XA_RDONLY;