views:

126

answers:

1

Hi,

in my project I have a database which many clients connect to. Concurrent access and writing works well. The problem now is not to reload the data every second from the database to always have the current status of the data.

Does Eclipselink provide a trigger mechanism on (automatically?) reload the data if the database is changed? How would one use this trigger?

Thanks!

+1  A: 

One solution I have seen used is to use triggers in the database to send a JMS message to your application. The message is then received in a MDB where the EclipseLink cache can be invalidated or refreshed. This approach works well on an Oracle database where the trigger drops messages into an AQ table.

The are DBMS specific solutions I am familiar with but the challenge is always to get the change notification to include the table and PK values instead of a ROWID and also to ensure you are not being notified of changes you made yourself or have some way to easily filter out notices from your own changes.

I believe GoldenGate helps to address this problem but have not yet tried it myself.

Doug

Doug Clarke