Hi Guy,
I got the mapping to work through XML! :-)
However, I now face another problem. I will end up with multiple
EntityManagerFactory won't I?
I then have a problem with running with spring's transaction
manager as it proxies all accesses to have
createEntityManager(..) calls so the same EM is returned always
inside the same transaction.
I would like to call functions like:
* transactionStart
* login() - using the sharedEMF
* list orders - using multitenantEMF
* transactionEnd
Do you have any idea how I can solve this?
Thank you very much for your time and support!
Best regards
Morten
Date: Wed, 24 Aug 2011 10:39:41 -0400
From:
guy.pelletier@xxxxxxxxxx
To:
hardhousemouse@xxxxxxxxxxx
Subject: Re: [eclipselink-users] Bypassing multitenant
criteria
Hi Morten,
You can set the following property to see more logging in
your persistence unit properties:
<property name="eclipselink.logging.level"
value="FINEST"/>
Also, if your eclipselink-orm.xml file is in the META-INF/
and named (eclipselink-orm.xml) dir it should find it
automatically. Or alternatively you can add it explicitly
with:
<mapping-file>META-INF/eclipselink-orm.xml</mapping-file>
Cheers,
Guy
On 24/08/2011 9:53 AM, Morten - wrote:
Hi again!
Great! Thanks a lot or your help!
I have been trying this, but I cannot get eclipselink to
see my (eclipselink)-orm.xml file, is there any way I can
see what is going up during startup? I tried dropping the
loglevel
<logger name="org.eclipse.persistence" level="TRACE"
/> but still no info. Any class I can breakpoint? :-)
I'm using Spring 3 if that is of any consequence for how
this is easiest set-up.
Best regards
Morten
Date: Wed, 24 Aug 2011 09:39:28
-0400
From:
guy.pelletier@xxxxxxxxxx
To:
hardhousemouse@xxxxxxxxxxx
Subject: Re: [eclipselink-users] Bypassing multitenant
criteria
Hi Morten,
Yes that would be a great way to do it. Have one XML
mapping file with all the standard JPA metadata which
is used in both PU's and a separate
eclipselink-orm.xml for each PU. One that adds
multitenant metadata and one that does not.
Cheers,
Guy