| Re: [eclipselink-users] EclipseLink OSGi bundles deployment in Tomcat (with Eclipse ServletBridge) errors. |
public
void persist(final Profile profile) { if (log.isDebugEnabled()) { log.debug(
"ProfileServiceBean.persist(), the profile which is about to be persisted is ["+ profile.getUName() +
"]");}
final EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(
"entityManager"); if (log.isDebugEnabled()) { log.debug("After getting the entity manager factory");}
entityManager = entityManagerFactory.createEntityManager(); if (log.isDebugEnabled()) { log.debug("After creating the entity manager");}
final EntityTransaction entityTransaction = entityManager.getTransaction();
entityTransaction.begin();
entityManager.persist(profile); if (log.isDebugEnabled()) { log.debug("After persisting the profile");}
entityTransaction.commit();
entityManager.close();entityManagerFactory.close();
}
Thank you for your time and immediate attention.Hi Azrin,
What EclipseLink version are you using?
Can you post the code you are using to create your entity manager factory?
-Tom