Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » How can I obtain instance of Project class so I can call setDefaultQueryResultsCachePolicy?
How can I obtain instance of Project class so I can call setDefaultQueryResultsCachePolicy? [message #1487516] Tue, 25 November 2014 22:55 Go to next message
Ross Goldberg is currently offline Ross GoldbergFriend
Messages: 7
Registered: July 2014
Junior Member
In EclipseLink 2.5.2, how can I obtain the instance of the org.eclipse.persistence.sessions.Project class that is associated with my existing PersistenceUnit / EntityManagerFactory so that I can call setDefaultQueryResultsCachePolicy?

Thanks.
Re: How can I obtain instance of Project class so I can call setDefaultQueryResultsCachePolicy? [message #1488391 is a reply to message #1487516] Wed, 26 November 2014 15:08 Go to previous message
Tomas Kraus is currently offline Tomas KrausFriend
Messages: 9
Registered: November 2014
Junior Member
EntityManager is an instance of org.eclipse.persistence.internal.jpa.EntityManagerImpl which contains databaseSession filed pointing to ServerSession instance. ServerSession has project attribute pointing to Project instance.
Try ((EntityManagerImpl)em).getServerSession().getProject() and you will get org.eclipse.persistence.sessions.Project instance.
Previous Topic:How to verify that result set is cached
Next Topic:Reading BLOB image from MySQL database in spring mvc
Goto Forum:
  


Current Time: Tue Mar 19 07:43:24 GMT 2024

Powered by FUDForum. Page generated in 0.02324 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top