1 Reply Latest reply on Apr 23, 2003 8:35 AM by Adrian Brock

    Read Only Method Does Not Synch With Database

    Tripper McCarthy Newbie

      Hi,

      I currently have an entity bean which has a method that returns a Model object of its contents. In the descriptor file for the cmp entity bean I declared the method that returns the model as read-only. I did this to cut down on deadlocks with high concurrency on the bean. This works well, but the only problem is that if there is a change to the underlying data store, the call to the read-only method does not synch the entity bean with the data store before returning the model. So I end up getting stale data back.

      This is quite confusing as I am running with commit option C, and if I remove the read-only attribute for the method, it is in synch with the data store (but it now can get into deadlock situations more easily).

      I'm running JBoss 3.0.2 with Tomcat 4.0.4. Any help would be appreciated.

      Thanks.