Commit singleton pattern example