Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] QueryHints Issue !!!

Hi Eclipselink users,

We are using eclipselink 2.4.0 and having a problem that is mystifying.  We are using jboss as our container , and spring jta to write data and so far so good. While testing we found that whenever we make a change to the database directly the data is not getting refreshed automatically (The eclipselink cache is not getting refreshed automatically). So we introduced a hint something like

 Query jpaq = JpaHelper.createQuery(query, getEntityManager()) ;
 jpaq.setHint(QueryHints.REFRESH, HintValues.TRUE) ;

and with this it is refreshing . But the problem with this approach is that if we have an update and read within the same transaction , it is not working. i think that the first update is just merging to the cache but when we do a find it is going and re reading it from the database and so am not getting the updates. How do i configure the hint to work in both the cases?

Cheers
Vaidya


Back to the top