Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Factory create entitiymanager container
Factory create entitiymanager container [message #1796063] Thu, 04 October 2018 15:34
Tomas Jacobsson is currently offline Tomas JacobssonFriend
Messages: 1
Registered: October 2018
Junior Member
I´m trying to create a factory to create entitymangers that lives in a transaction scope in weblogic 10.3.6.

I´m able to create it and join a jta transaction but the entitymanger is not closed when the transaction commits.

I eclipselink.persistence-context.close-on-commit to true and eclipselink.target-server = WebLogic_10

like:
<property name="eclipselink.target-server" value="WebLogic_10"/>
<property name="eclipselink.persistence-context.close-on-commit" value="true"/>

I create the

EntityManager entityManager= Persistence.createEntityManagerFactory(persistentEnhet);
entityManager.joinTransaction();

It commits database on transaction commit but the entitymanager is still open.

Why I´m creating entitymanager with factory and not with annotations is
The stateless class is genererated and have multiple persistenceUnitNames och when it creates cannot know which units is available in that context.

What am I doing wrong?
Previous Topic:Immutable and read-only mappings
Next Topic:Can Value Holder Indirection be used with JPA?
Goto Forum:
  


Current Time: Mon Oct 21 05:00:57 GMT 2019

Powered by FUDForum. Page generated in 0.57948 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top