-
1. Re: Problem viewing the updated details in another session bean
gaborj Apr 1, 2010 6:05 PM (in response to shanikaweerapperuma)Hi,
Apparently, this is because of the session cache. i.e. :
A Hibernate Session is a transaction-level cache of persistent data. (Hibernate 3 Docs)Probably, you want to update the cache of your other session bean calling
.refresh()
on your entityManager... -
2. Re: Problem viewing the updated details in another session bean
shanikaweerapperuma Apr 7, 2010 7:51 AM (in response to shanikaweerapperuma)Hi Gabor,
Thanks for the reply.
I tried your suggession to calling em.refresh() on the second session bean before the query method is called, but it didn't work either.
-shanika
-
3. Re: Problem viewing the updated details in another session bean
shanikaweerapperuma Apr 7, 2010 7:52 AM (in response to shanikaweerapperuma)Hi Gabor,
Thanks for the reply.
I tried your suggession to calling em.refresh() on the second session bean before the query method is called, but it didn't work either.
-shanika
-
4. Re: Problem viewing the updated details in another session bean
gaborj Apr 7, 2010 5:05 PM (in response to shanikaweerapperuma)Without code example I can only say the problem is with your intention to the transaction boundaries. If you want to use that data in other SB you should first commit the transaction in the first (by default it happens by the end of your update method in SBs), refresh your session cache in the second then it should work...