Upgrade
Sign In : Sign Up : Blog : Search: Language : Help :
This website is now frozen, please migrate your content to BotLibre.com or BotLibre.biz
Java Persistence Performance

EclipseLink 2.5.2 cache coordination listener

by mnb posted Sep 19 2014, 6:51

In EclipseLink 2.5.2, I would like to somehow register a listener for whenever cache coordination messages have been received and processed by EclipseLink.

The listener would have to have a collection of coordinated entities passed in as an argument, so that my code could perform different logic depending on what entities were coordinated.

I'm using JMS cache coordination, if that makes any difference.

Any help would be appreciated.

Thanks.


by jamesssss posted Sep 20 2014, 17:42
You can register a SessionEventListener with your session (eclipselink.session-event-listener).

You can see its JavaDoc here,
https://www.eclipse.org/eclipselink/api/2.0/org/eclipse/persistence/sessions/SessionEventListener.html

The event your want is most likely, postMergeUnitOfWorkChangeSet. The event has the UnitOfWorkChangeSet which has a bunch of ObjectChangeSets that describe the objects that changed.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1953, today: 2, week: 8, month: 16

Id: 322002
Tags: cache, eclipselink, jpa, coordination, listener
Posted: Sep 19 2014, 6:51
Updated: Sep 20 2014, 16:44
Replies: 1
Views: 1636, today: 2, week: 7, month: 19
I'm sure
Flag graphic as offensive, or in violation of site rules