commit before sessionfactory