BaseEntityManager em = null;
if(PersistenceGuiceContext.getInstance().isUseJPA())
em = new JpaEntityManager(clazz,GuiceContext.getInstance().getBean(EntityManagerProvider.class).get());
else if(PersistenceGuiceContext.getInstance().isUseHibernate())
em = new HibernateEntityManager(clazz,GuiceContext.getInstance().getBean(SessionProvider.class).get());
return em;
}