Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Accessing EclipseLink cache OR coordination with EHCache

Yes, in JPA object read with native queries are loaded the same as any other
object, only the SQL to fetch them is different.

There is documentation the EclipseLink cache here:

http://wiki.eclipse.org/EclipseLink/UserGuide/Caching_with_EclipseLink_(ELUG)

The cache API is defined here:

http://www.eclipse.org/eclipselink/api/1.0.2/index.html


Guillaume Bilodeau wrote:
> 
> That's great news, I'm glad to see someone else has used this in the past. 
> Unfortunately there isn't a lot of documentation on the subject for
> EclipseLink, or at least I couldn't find much.  When entities are loaded
> through native queries are they also managed by the EntityManager and so
> receive the same services such as change tracking?
> 
> Thanks again,
> GB
> 
> 
> tch wrote:
>> 
>> They hit the same caches L1 and L2, they're a great option we use them
>> quite a bit rather than raw jdbc.
>> 
>> 
>> ./tch
>> 
>> 
>> 
>> On Tue, Feb 17, 2009 at 9:25 AM, Guillaume Bilodeau <gbilodeau@xxxxxxxxx>
>> wrote:
>>>
>>> I've just read about JPA native queries and it looks like an interesting
>>> option instead of using plain JDBC statements.  Are native queries
>>> hitting
>>> the EclipseLink cache or does it require some form of manual
>>> integration?
>>>
>>> Cheers,
>>> GB
>>>
>>>
>>> Guillaume Bilodeau wrote:
>>>>
>>>> Hi guys,
>>>>
>>>> We're looking into using EclipseLink in a web application targeting
>>>> WebLogic 10.3 where data access would be done using both JPA and native
>>>> JDBC.  We will need aggressive caching to achieve short response times
>>>> and
>>>> ideally, a cache shared between both mechanisms would be used.
>>>>
>>>> From what I gather, EclipseLink doesn't support external cache
>>>> providers
>>>> such as EHCache but instead relies on an internal strategy to store,
>>>> query
>>>> and invalidate cached data.  The native JDBC connections could leverage
>>>> that cache, but I can't find any API to interact with it.  Using two
>>>> cache
>>>> managers is out of  the question since it would bring too many stale
>>>> data
>>>> and coordination issues.
>>>>
>>>> Am I missing something or is sharing a cache between EclipseLink and
>>>> native JDBC impossible?
>>>>
>>>> Thanks all,
>>>> GB
>>>>
>> 
>> 
> 
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/Accessing-EclipseLink-cache-OR-coordination-with-EHCache-tp22046013p22059710.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top