session = sessionFactory.openSession();
}
StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
if (standardTransaction!=null) {
HibernateSessionResource hibernateSessionResource = new HibernateSessionResource(session);
standardTransaction.enlistResource(hibernateSessionResource);
}
return session;
}