wasCommitted()do not always have to return true, even if the commit was successful . It will return trueif the transaction was (unambiguously) committedthrough this local transaction; falseotherwise.
From docs : -
wasCommitted
false (). , JTA, no-op, commit() ; wasCommitted() false.