[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [eclipselink-users] crossing entity managers?
- From: "Tim Hollosy" <hollosyt@xxxxxxxxx>
- Date: Wed, 8 Oct 2008 10:16:09 -0400
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ISOGdUm241oMhf+SNiWotZghhf1T+X10+bQ3Wpt3RNe67tBW8npzedyME4U70u+qSa pK84SpPnHEYd9gBvQvDzSUG30887BlULa30/ElKWi2qCCJ98NCZ5XKAqLYq+SQCCjYAA ZeoT96JPA334KSXWAVnUzqRmZUBfczaW+xY6M=
Ah, I've never done it, but I know the question has come up on the
list before, check out this thread:
On Wed, Oct 8, 2008 at 10:08 AM, natjohns <natjohns@xxxxxxxxxxx> wrote:
> It's actually the former case. We have multiple modules, each with their own
> persistence.xml and entities. But now they need to query across one another.
> Other ORM technologies that I have used in the past allow you to "merge" the
> equivalent of the persistence.xml files. I got around it by adding all the
> entities to one big persistence.xml, but that just seemed hacky.
> Tim Hollosy wrote:
>> I'm not following - are you using multiple persistence.xml's?
>> Or do you just have a few DAO classes that all use @PersitenceContext?
>> If it's the latter, that's the normal usage as I understand so how are
>> you coming to the conclusion that some classes can't make certain
>> queries because they don't have the "right" EntityManager?
>> Perhaps you're running into the problem that you're trying to work
>> with unmanaged Entities?
>> On Tue, Oct 7, 2008 at 9:21 AM, natjohns <natjohns@xxxxxxxxxxx> wrote:
>>> Hi all,
>>> I've got multiple spring files wiring up sets of entities. They each use
>>> auto-injection of Persistence Contexts like this:
>>> Now I am running into the problem that some classes can not make certain
>>> queries because they don't have the right entity manager. Is there an
>>> way to combine all entity managers and have a single point that knows
>>> all entities?
>>> eclipselink-users mailing list
>> eclipselink-users mailing list
> Nathaniel A. Johnson
> Principal Systems Analyst
> Enterprise Services Integration
> Division of Enterprise Software
> Indiana University
> eclipselink-users mailing list