2 Replies Latest reply on Aug 16, 2002 8:56 PM by Dain Sundstrom

    A Problem with RequiresNew!

    Dong Hun Kim Newbie

      Hi all,

      I am using JBoss3.0.1 with MSSql server.
      I have a proble with RequiresNew.

      One Ejb(1) in Required calls another EJB(2) in RequiresNew.

      EJB(2) inserts some data into one table.
      Until here, everthing is okay.

      But, if I throw an EJBException after the insertion,
      JBoss hangs and JBoss seems not to release the lock for the table. I think that JBoss tries to rollback for the table, but it can't.

      When I put EJB(2) in Required, everything is okay.
      All the transation in EJB(1) and EJB(2) are rollbacked.

      But I want transactions in EJB(2) to be rallbacked and want transactions in EJB(1) to be commited.
      That's why I put EJB(1) in required and EJB(2) in RequiresNew.

      If I make EJB(2) MDB, I can get what I want.
      But, I want to know if my problem is due to a bug of JBoss or I am doing something wrong.