|
|
Re: Can I use EclipseLink without sessions.xml/project.xml [message #1163782 is a reply to message #1159346] |
Thu, 31 October 2013 07:56 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Thanks, I am running in an OSGI environment, is there a way that I can use Gemini JPA without sessions.xml?
gr. Martin
On 10/28/2013 02:11 PM, Chris Delahunt wrote:
> SessionManager.getManager().getSession(name) is used for loading EclipseLink sessions from Sessions.xml, while
> persistence.xml is loaded using JPA's Persistence.getEntityManagerFactory("classpath:default") to get an
> EntityManagerFactory. If you are going to use a persistence.xml, you can always get the EclipseLink native Session
> instance from the EntityManager using em.unwrap(JpaEntityManager.class).getServerSession(), allowing you to use the JPA
> and access native EclipseLink api as needed.
>
> Best Regards,
> Chris
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
Powered by
FUDForum. Page generated in 0.03244 seconds