3 Replies Latest reply on Oct 21, 2002 12:12 PM by ericcire

    Session -> Entity Deadlock

    ericcire

      I have a session bean and an entity bean. The session beans loads two entity beans, changes some parameters, then creates two new entity beans. The problem is when two clients (using the session bean) request at the same time, for the same entity beans, the whole system deadlocks, and the transaction gets rolled back after the timeout.

      The Session bean is a stateless session with container transactions (marked Required and RequiresNew - I've tried both), and the Entity bean uses container transactions and BMP.

      Any ideas? I expected that when two requests came into the Session bean, for the same entity beans, one would go ahead and one would roll back, or else one would go ahead, and the other wait for the first to finish, in which case it would have to roll back. Instead, the system hangs until the timeout, and both are rolled back.

      Any ideas?