I begin the transaction with
Code:
context.getTransactionSynchronizer().beginTransaction();
And check in a subsequent action state using
Code:
if(!context.getTransactionSynchronizer().inTransaction(false)){
//do error stuff
}
If this action state is after a form submission, which submits the token, its all good. If the action state follows on from another action state ie
Code:
<action-state id="validateApplication">
<action bean="applicationWorkflowAction" method="validateApplication"/>
<transition on="success" to="submitApplication"/>
<transition on="error" to="applicationForm"/>
</action-state>
Where validateApplication is reached from a form submission and the transaction check returns true, in submitApplication however the transaction check returns false.