specified session context class and added transaction wrapper around events save.