Checks whether a transaction can be committed.
The policy is allowed to wait, e.g. if there
are other threads still associated with the transaction.
This method is invoked before any transaction synchronizations'
beforeCompletions.
This policy should not invoke any methods that change the
state of the transaction other than setRollbackOnly()
to force a rollback or registering a transaction synchronization.
Parameters: transaction - the transaction throws: SecurityException - if a commit is not allowed from this context |