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:

The cache API is defined here:

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

--- James Sutherland
 EclipseLink ,
Wiki: EclipseLink , TopLink 
Forums: TopLink , EclipseLink 
Book: Java Persistence 
View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top