Dear All,
I would need a guidance on resolving a EJB Transaction Management.
My application is running on a websphere.
A JMS message is posted to my application by another application, the message listener picks up calls the business layer and persisted using Entity Beans 2.1.
At the end of listener, reply back to the sender by posting the response message. (End of this on message transaction)
Now the other application, immediately validates the response and sends different request (with same entity)
Again the listener picks this message and calls the business layer, now business layers looks up for same entity (using findbyPrimaryKey) which results in Finder exception (saying record is not found).
If a delay is introduced in the other application (1 min, to validate and sending another request), every thing works good.
Everything is container managed, so i am not sure on how the container is flushing the cache to Database and why there is record not found exception, when the transaction is completed successfully. Ideally the container should have released the lock if any.
I would suspect there is a delay between pushing changes in Cache to Database, which is completely managed by Container, which is causing another transaction not to view the record as entity bean synchronizes the row.
Please help in resolving this issue
Thanks
Rudresh