This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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 ?