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: Find out list of managed entities for persistence context
PostPosted: Fri Nov 26, 2010 3:31 am 
Newbie

Joined: Fri Nov 26, 2010 3:09 am
Posts: 2
Hello,

Is there any way to find list of all managed entities that belong to given persistence context?

In my application there are several modules, each having its own persistence.xml and managing
different set of entities, thus resulting in several EntityManagers (ie. Sessions in hibernate terms).
Then there is main block of code which uses these modules, however if I want to work with some
entities I have to know to which PersistenceContext entity belongs and must choose proper EntityManager
instance.
If there would be any way to obtain list of all managed entities for given EntityManager (its PersistenceContext),
I could work with entities transparently, without knowledge where entity belongs to.

Thanks for response
Mike


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.