1 Reply Latest reply on Jul 29, 2003 4:03 PM by juhalindfors

    Entity locking and RequiresNew

      If I cause all methods of an entity bean to have transaction attribute of RequiresNew, would the containing transaction still hold on lock on that entity bean?

      Here is the problem: We have some entity beans that are locking because they are used pervasively. The invocation of those entity bean methods are pretty quick. The transactions they are in have performance issues. We don't want those entity beans to be locked for the duration of the containing transaction.

      We're on 3.0.5 in production, though we are going to 3.2.1 in the next few weeks.

        • 1. Re: Entity locking and RequiresNew

          > If I cause all methods of an entity bean to have
          > transaction attribute of RequiresNew, would the
          > containing transaction still hold on lock on that
          > entity bean?

          No. New transaction is started before the container invokes your bean method. The locking is done after the tx.begin().

          -- Juha