1 Reply Latest reply on Sep 16, 2009 4:40 AM by gienasek

    AS transaction issue

    gienasek Newbie

      Hello,

      I spent few hours to accomplish simple scenario:
      1. Client application call remote EJB3 SLS bean1 method go()
      2. bean1.go() do some DB inserts
      3. bean1.go() call another bean: bean2.go()
      4. bean2.go() do some DB inserts

      I would like span bean1.go() and bena2.go() one global transaction started in
      bean1.go() and have no effect i.e after crash in bean2.go() changes in bean1.go() are persisted in DB.
      I use:
      1. CMT transaction:
      bean1.go(), bean2,go() marked @TransactionAttribute(TransactionAttributeType.REQUIRED)
      2. <xa-datasource>
      3.I even installed JTS
      4.Postgresql DB right JDBC Driver (XA)
      5. JBOSS AS 5.1

      I read https://www.jboss.org/community/docs/DOC-13179
      Please help me accomplish this "simple" scenario.

      thanks in advance
      GG

        • 1. Re: AS transaction issue
          gienasek Newbie

          Ok I did it , my mistake bean2.go() was marked @TransactionAttribute(TransactionAttributeType.REQUIRED_NEW) and should by @TransactionAttribute(TransactionAttributeType.REQUIRED) as I wrote .

          Now I'm wonderig if transaction from one bean can by used in other bean in BMT environment ?

          thanks
          GG