1 Reply Latest reply on Dec 13, 2001 3:33 PM by schaefera

    Transactions management !

    warx_sg

      Hello everybody,

      i have just finished reading a tutorial about EJB.
      My question is: suppose that from an EJB i call two methods of other two EJB which run two insert query and the second query fails.
      What happen in this case ?
      Is the entiry process rollbacked or only the first query is executed ?
      If the process is rollbacked this is for all the types of EJB, i mean entity bean managed by the container and not.
      Cheers.

      Stefano

        • 1. Re: Transactions management !
          schaefera

          For short: it depends.

          When all the called methods run in the same transaction
          and one fails then both fails. Therefore ensure that EJB calling the other EJBs has a transaction and that the other EJBs take this transaction over (no transaction attribute RequireNew or None).

          Andy