2 Replies Latest reply on Oct 7, 2002 1:02 AM by Camus

    Transaction problem

    Camus Newbie


      Could any of you help me solve the newbie question which keeps me several days:
      - There are 2 CMP beans, which insert one row of data into two tables, and this transaction is initiated in the stateless session bean. In ejb-jar.xml, I have put the 2 CMP beans in <assembly-descriptor> and the transaction type of the session bean set to Container, and trans-attribute set to Required.
      - Problem: when is any DB-level error in the second insert (e.g. value too long for a field), the first insert is still succeed. I added a 1 minute sleep between the 2 inserts in the session bean, and found that after 1 insert, the data has been written to the database.

      What's the problem and how to make it works ?

      Many thanks.


        • 1. Re: Transaction problem
          david Newbie


          I have similar problem. I have read through those EJB 2.0 books and this forum, and have no idea about it.

          Is there any configuration to JBoss 3.0 ? My deployment descriptor follows from the book and all beans are deployed without any warning / errors.

          Really appreciate if someone could help.

          • 2. Re: Transaction problem
            Camus Newbie


            I've upgraded to JBoss 3.0.3 + Tomcat 4.1.12 with Oracle8i and Solaris 2.7.

            The problem still persists. Any hint for me ?

            Thank you in advance.