Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Alert that DCN Took Place(Can I be notified that a DCN was handled by Eclipse Link JPA?)
Alert that DCN Took Place [message #1007457] Tue, 05 February 2013 22:20 Go to next message
Julie Schenk is currently offline Julie SchenkFriend
Messages: 18
Registered: August 2012
Junior Member
I'm looking for some way to be notified of the Database Change Notification update outright in addition to knowing that when I query [again] I will get updated information from the cache object/db. In my case, I have a GUI to update when a change occurs to the DB.

I started following along the basic DCN example from (

dcr = oc.registerDatabaseChangeNotification(prop);
DatabaseChangeNotificationListener list =
new DatabaseChangeNotificationListener();

but after using scripts to create my tables I don't get anything back from the following:

String[] tableNames = dcr.getTables();

In the basic example of course EclipseLink JPA isn't use- just a regular statement to "register" the table.

So is there something to which I can listen to know that there's been a change so that I know to update my GUI pages that have the same Oracle DB backend? My objects are all persistent objects. I updated persentence.xml just like suggested here: And I verified that the example runs with my environment.

Hope that makes some sense.


How do I get a hold of the OracleChangeNotificationListener directly? Or, can I be notified that the cache has been invalidated?

[Updated on: Wed, 06 February 2013 16:21]

Report message to a moderator

Re: Alert that DCN Took Place [message #1008075 is a reply to message #1007457] Fri, 08 February 2013 18:26 Go to previous message
Julie Schenk is currently offline Julie SchenkFriend
Messages: 18
Registered: August 2012
Junior Member
I went ahead and registered my tables in the same manner as the basic DCN example does and it seems to work just fine. I open two instances of my application, add an item to the DB via one of my GUI lists, and the listener in the other GUI prints out a message. Fantastic.

Does anyone see any complications that I don't w.r.t. the existing Eclipse Link DCN registration(s)?

Also, if there's a more graceful and/or streamline way to be going about this I'd love to know.

Previous Topic:Retrieving data from a resultset with two or more same column names.
Next Topic:JPA caching
Goto Forum:

Current Time: Tue Apr 24 18:26:01 GMT 2018

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

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