add a setCommitListener method