I am working with EJB 1.1 and would like to get the updated data in the app when ever there is database change. Currently it takes random amount of time to get the updated data. I am not sure what i am supposed to be looking for . Is there a config option in App or Jboss server that the app is residing on?
I found the option <clean-read-ahead-on-load>True</clean-read-ahead-on-load>
but that doesn't seem to work.
Any ideas?
update: I found several posts showing how to invalidate ejb cache when using JPA if the data on the database changed asynchronously ( changed manually outside the app). but i am still looking for a way to do it in EJB 1.1
one example is
entityManager.getEntityManagerFactory().getCache().evictAll()
but how do i get access to entityManager in the first place?
Update 2: if there is no way to do it just with EJBs to actively look for data change can i just manually invalidate the cache from the app side? i.e., when i know that the data must have changed asynchronously i want to do something manually on the app side to invalidate the cache.