moved session factory to applicationContext