Transaction Behaviour


EJB design: Transaction Behaviour

  1. Transaction Behaviour (1 messages)

    Our Enviroment is:
    Solaris 5.8
    JVM 1.3
    Oracle 8
    Type 3
    Weblogic 6.1 Clustered
    1300 jars ,700 Entity beans and Mostly Stateful beans
    TX and NON TX Data sources with multipool
    Front-End Swings

    In weblogic 6.1 ,i am using application exception ,on basis of some condtion transaction is not rolledback properly in weblogic 6.1 but it was not so in 5.1.Transaction Attribtute is Required.I can rollback transaction throwing EJBException but in this case i can not pass the customized message.
    In customized exception i am using non-tx datasource for fetching message from database

    Pls respond soon.
    Thanks in advance

    Threaded Messages (1)

  2. Transaction Behaviour[ Go to top ]

    I'm not completely sure of what your specific situation is, but the expected behavior should be that application exceptions do not roll back the transactions automatically, while system exceptions (like the EJBException) will. If that is what is happening, it is actually the correct behavior. In order to roll back transactions for application exceptions (those that do not extend RuntimeException) you need to call the EntityContext's setRollbackOnly() method. That should do it.