-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Use EntityMananger in many jar component independent JPA
PostPosted: Fri Jul 08, 2016 11:03 am 
Newbie

Joined: Fri Jul 08, 2016 11:00 am
Posts: 1
Because ours application have many dependent jar and many entity in each jar component (without use .ear for all application). I can not use inject @PersistenceContext to use common EntityManager for all Entity of jars. I use one peristence.xml to list all Entity in all jar. Then configure bind EntityManager to JNDI with hibernate in peristence.xml :

<property name="jboss.entity.manager.jndi.name" value="java:/entityManager"/>
Then i can call EntityManager by JNDI. But i don't know how to bind entityMananger with "PersistenceContextType.EXTENDED" to JNDI. Or others solution to call EntityManager common for all jar in EJB without use JNDI call. I try with @PersistenceContext(xyz.jar#entityManager) but entityManager is always null.

Others question :

I want to separate the configuration of info database in other file configration like database.xml, not in persistence.xml of JPA . But i can not find how to separate the configuration of database in other file configuration with JPA and hibernate. (EJB/JPA/Hibernate environement) You can help me ?

Thanks you for help


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.