Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Factory create entitiymanager container
Factory create entitiymanager container [message #1796063] Thu, 04 October 2018 11:34
Eclipse UserFriend
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: Wed Jul 16 01:30:01 EDT 2025

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

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

Back to the top