Discussions

EJB design: Doubts in transcation

  1. Doubts in transcation (2 messages)

    Hai,

    1)
    I have two session bean which do some database operation.
    And in my deployment descriptor I have set transcational attribute
    as Required, as well as transcation type as bean.

    I have another bean which calls the methods of other two
    session bean.And in my deployment descriptor I have set transcational attribute
    as RequiresNew, as well as transcation type as bean.

    Entire thing is working fine for the first time.I mean it gets rollbacked when one
    gets fails.But when I do it next time (without restarting weblogic server) it's not working.I mean even one gets fails
    other gets committed.

    What should I do inorder to work well.
       
    2)
    When I do it using container managed transction, i couldn't accomplish
    transcation concepts.I mean even one gets fails
    other gets committed.

    Thanks in advance
    With Regards,
    Vinoth.c

    Threaded Messages (2)

  2. Doubts in transcation[ Go to top ]

    Why not set all the transactions to TX_REQUIRED. In that way the container will create a new transaction context for you for the client ejb and the beans it calls will use the same context when in a transaction. also if the client ejb didnt result in a transaction context being created (ie didnt run a transaction) then the beans it calls will have there own transaction context allocated to them by the containter when they execute a transaction.

    regards

    nailer
  3. Doubts in transcation[ Go to top ]

    Im a bit confused as to what is going on here. Are you using CMT? If so, what beans have what settings and what beans are calling which and how. Can you give me simple examples please.

    Dave Wolf
    Internet Applications Division
    Sybase