1 Reply Latest reply on Oct 7, 2002 4:48 AM by Alexey Loubyansky

    Deadlocks on read?

    Horia Muntean Newbie

      Hello all.

      I have a method of a facade session bean (stateless) that only accesses (by reading) 2 entity beans instances (with pk1 and pk2, in this order). The same method, is some other situations (business requirements) accesses the same 2 entity beans instaces, but in the reverse order (pk2 and pk1 respectively). When to parallel clients call the facade method(client A calls with pk1,pk2 and client B calls pk2,pk1), I get a DEADLOCK.

      My question is: are the entity beans locked within the tx started by the session bean method, even if the entity beans methods called are "get" methods? If so, how can I configure jboss in order NOT to lock the entity beans when read only methods ("get" methods) are called upon them?

      I guess that, if posible, the "get" methods should return not commited data of the entity bean.

      Thanks.