public static void assertTransactionValid(InvocationContext ctx)
{
Transaction tx = ctx.getTransaction();
if (!isValid(tx)) try
{
throw new CacheException("Invalid transaction " + tx + ", status = " + (tx == null ? null : tx.getStatus()));
}
catch (SystemException e)
{
throw new CacheException("Exception trying to analyse status of transaction " + tx, e);
}
}