// Dedicated for the first call of the propagation tests.
public String testXA(ASFailureSpec[] fSpecsNode, ASFailureSpec[] fSpecsRemoteNode, String testEntityPK, String testEntityPKRemoteNode, String remoteHost, boolean expectFailureOnRemoteNode, boolean useOTS, int remoteJndiPort, int remoteCorbaPort)
{
log.info("CMT testXA called with " + fSpecsNode.length + "(this node) and " + fSpecsRemoteNode.length + "(remote node) specs and testEntityPK=" + testEntityPK + ", testEntityPKRemoteNode=" + testEntityPKRemoteNode + ", remoteHost=" + remoteHost + ", expectFailureOnRemoteNode=" + expectFailureOnRemoteNode + ", useOTS=" + useOTS);
TestASRecoveryWithJTSPropagation xatest = new TestASRecoveryWithJTSPropagation();
Transaction tx;
try
{
tx = com.arjuna.ats.jta.TransactionManager.transactionManager().getTransaction();
}
catch (javax.transaction.SystemException e)
{
tx = null;
}
if (tx == null)
{
log.error("CMT method called without a transaction");
return "Failed";
}
else
{
xatest.setTestEntityPK(testEntityPK);
xatest.setRemoteHost(remoteHost);
xatest.setfSpecsRemoteNode(fSpecsRemoteNode);
xatest.setTestEntityPKRemoteNode(testEntityPKRemoteNode);
xatest.setExpectFailureOnRemoteNode(expectFailureOnRemoteNode);
xatest.setRemoteJndiPort(remoteJndiPort);
xatest.setRemoteCorbaPort(remoteCorbaPort);
xatest.setUseEJB3(false);
xatest.setUseOTS(useOTS);
for (ASFailureSpec spec : fSpecsNode)
xatest.addResource(spec);
return xatest.startTest(tx) ? "Passed" : "Failed";
}
}