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.