This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Now, I build Entity & Session Bean in a JAR file and call them in Client file below.
AND I Have a Client File (Client.java)
Now, my problem is that when i call this method getListValues() of Client.java, it returns the result of the query specified in Session Bean but when i go and edit the table in the backend - Commit the values in the backend itself and then call this method, it fetches old values.
How Can I call em.refresh() here? Where Do i need to call em.refresh()? In the client file or Session Bean. If in the client file then how will it recognize em (EntityManager) in Client file?
Do I also need to call em.flush along with refresh ?