[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [eclipselink-users] Notifications about external database changes
|
- From: James Sutherland <jamesssss@xxxxxxxxx>
- Date: Wed, 10 Jun 2009 12:40:42 -0700 (PDT)
- Delivered-to: eclipselink-users@eclipse.org
You can disable the shared cache using the persistence.xml property,
"eclipselink.cache.shared.default"="false"
Trigger or specific database mechanism are the only way to get events from
the database. You could maintain a open/changed or change number column in
your tables that the external application must update, so you can at least
limit your polling query to filter on that column.
philk wrote:
>
> Hello,
>
> I am having a little trouble understanding how my EntityManager could be
> informed about changes to the database that were made by a 3rd Party
> program in another process. Is there any recommended way to reload/refresh
> the entities in the entity manager? I am currently using
> "eclipselink.refresh=true" as a query hint in my getResultList() calls.
> But once you forget that, you will not see external changes. Is there a
> way to globally turn of entity caching?
>
> Also is there a "non-pull" way of getting notified about changes in tables
> from outside? My application needs to monitor progress on orders and
> currently I am polling every 10 seconds to do a full entity update using a
> "select e from SendOrder e" query. Which is of course highly inefficient.
> I could use DB-triggers but they cannot be managed by JPA and are not
> available on every database.
>
> Any ideas?
>
> Thanks,
> Phil
>
>
-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.eclipse.org/eclipselink/
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
--
View this message in context: http://www.nabble.com/Notifications-about-external-database-changes-tp23931435p23969553.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.