openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: OpenJPA DCN/QCN Caching Support?
Date Mon, 07 Jan 2013 15:39:29 GMT
Hi Will,
Good to know it's not a make-or-break usage scenario for OpenJPA.
Depending on your application and the interactions with your database, this
change notification may not even be necessary.  One capability that OpenJPA
does provide is the ability to drop and re-load the cache on a regular
basis (you define the interval of the eviction schedule) [1].  This type of
data cache refresh may be sufficient for your needs, depending on your
scenarios.

>  I guess there would have to be some thought/discussion on configuration
options.  Maybe there could be an option that would allow control over how
stale data is handled during the L2 window period?

If you do decide to pursue this option, then we would definitely need some
type of configuration to control this processing.  Configuring whatever
listener is required should be sufficient for the enable/disable
capability.  We would also need to keep in mind that other databases exist
besides Oracle...  :-)  That is, if other databases provide a similar type
of callback, we would want the configuration to handle these other
databases.  Not that your contributed solution has to handle other
databases, but we need the ability to extend the capability to other
databases.

Thanks!
Kevin

[1]
http://openjpa.apache.org/builds/latest/docs/docbook/manual.html#ref_guide_cache_conf

On Mon, Jan 7, 2013 at 8:00 AM, Will Hoover <java.whoover@gmail.com> wrote:

> I wouldn't say it's a make or break feature for using OpenJPA, but it would
> be a bonus. I wouldn't mind making a contribution to add this feature. By
> the looks of how EclipseLink did things it doesn't seem like it would be
> too
> difficult to implement
> (
> http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/foundation/
>
> org.eclipse.persistence.oracle/src/org/eclipse/persistence/platform/database
> /oracle/dcn/OracleChangeNotificationListener.java ). I guess there would
> have to be some thought/discussion on configuration options. Maybe there
> could be an option that would allow control over how stale data is handled
> during the L2 window period?
>
> -----Original Message-----
> From: Kevin Sutter [mailto:kwsutter@gmail.com]
> Sent: Friday, January 04, 2013 2:25 PM
> To: users@openjpa.apache.org
> Subject: Re: OpenJPA DCN/QCN Caching Support?
>
> Hi Will,
> OpenJPA does support L2 caching.  But, it does not currently support the
> "database change notification" as specified in the EclipseLink
> documentation.  We are looking at providing this type of notification
> support, but there is some concern about the "window" between the time that
> the data gets updated in the database and notifying the L2 cache to either
> remove or update the contents.  You could argue that any window of time is
> better than no automatic notification, but the app still has to know that
> they could be processing stale data.  And, closing the window completely
> may
> not actually even be desired since there could be a potential bottleneck at
> the notification and processing levels...
>
> It's good to have this conversation though...  Are you indicating this lack
> of DCN processing is a make-or-break feature for your usage of OpenJPA?  If
> so, would you be interested in helping to develop such a feature?
>
> Thanks,
> Kevin
>
> On Fri, Jan 4, 2013 at 1:07 PM, Will Hoover <java.whoover@gmail.com>
> wrote:
>
> > Does OpenJPA support caching using DCN/QCN similar to EclipseLink?
> >
> > http://wiki.eclipse.org/EclipseLink/Examples/JPA/DCN
> >
> > http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Developmen
> > t/Cach
> > ing/DatabaseEvents<http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/B
> > asic_JPA_Development/Cach%0Aing/DatabaseEvents>
> >
> >
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message