Transaction tx = TransactionCoordination.getInstance().getTransaction();
boolean joinPossible = (action != ACTION_JOIN_IF_POSSIBLE || (action == ACTION_JOIN_IF_POSSIBLE && tx != null));
if (action != ACTION_NEVER && action != ACTION_NONE && factory == null)
{
// TODO use TransactionException here? This causes API changes as TE is a checked exception ...
throw new MuleRuntimeException(CoreMessages.transactionFactoryIsMandatory(getActionAsString()));
}
return action != ACTION_NEVER && action != ACTION_NONE && factory.isTransacted() && joinPossible;
}