How can I ensure that my app has the latest data?
Note that this can be quite expensive if the fetch size is high, causing multiple rows to be returned ( see What does setFetchSize() really do? ) and obviously causes a trip back to the server in any case. This will only work for a scrollable ResultSet requested with ResultSet.TYPE_SCROLL_SENSITIVE; the method call is ignored for other types. For more information, see 3.3.7 Getting the Most Recent Data in the Advanced Tutorial at the JDC.