The client will then listen to the JMS topic and read the new record from database. Usually this works pretty well, but sometimes, the client cannot find the new record from database at all and a few seconds later it can. It is as if there is a delay between the JMS messaging and database persistence - somehow the client receives the message first and at this time the record is not really saved into database yet!
Can anyone explain to me what is going on here? What kind of solutions might help to resolve this?
BTW, I am using the Hibernate EntityManager. My app server is Glassfish.