EclipseLink Solutions Guide for EclipseLink
Release 2.5
  Go To Table Of Contents
 Search
 PDF

20 Using Database Events to Invalidate the Cache

This chapter describes TopLink's support for Oracle Database Continuous Query Notification (CQN), which allows you to use caching with a shared database in JPA.


NoteNote:

Oracle Database Continuous Query Notification was also formerly known as Oracle Database Change Notification.


This chapter contains the following sections:

Use Case

Users want to use a shared cache with their JPA application, however, external applications update the same database data, or the cache is in a clustered environment. The cache may retain stale data.

Solution

The Oracle database provides an API to allow applications to register for notification of database changes. EclipseLink supports registering with the Oracle database and processing database change events to invalidate changed objects in the shared cache

Components

Sample

For sample files that illustrate the use of Continuous Query Notification and shared caching in an application that uses JPA, see "EclipseLink/Examples/JPA/DCN" in the EclipseLink documentation.

http://wiki.eclipse.org/EclipseLink/Examples/JPA/DCN