Transaction RollBack Exception

Discussions

EJB programming & troubleshooting: Transaction RollBack Exception

  1. Transaction RollBack Exception (2 messages)

    Hi !
    I have JSP client with stateless session bean talking to BMP entity bean both having Container Managed transaction. When more than one users start using the application, Iam getting "Transaction RollBackException" error. Probably this could be because of more than one user tryinh to update the same record in a table. How to solve this problem , do I got to make some changes in the deployment descriptor or the bean code (whether session or entity bean). Early reply is appreciated.
    Thanks
    AJP

    Threaded Messages (2)

  2. Transaction RollBack Exception[ Go to top ]

    What are the transaction isolation levels, and the transaction requirements on the beans / methods in question?

    Chz

    Tony
  3. Transaction isolation[ Go to top ]

    Hi Tony !
    Thanks for yur response. I've included the transaction-isolation level in weblogic-ejb-jar.xml as below :
    <weblogic-enterprise-bean>
    :
    :
    :
    <transaction-isolation>
    <isolation-level>TRANSACTION_SERIALIZABLE</isolation-level>
           <method>
           <ejb-name>Part</ejb-name>
           <method-name>*</method-name>
           </method>
    </transaction-isolation>
     </weblogic-enterprise-bean>

    I've included this in both session and entity bean with changed ejb-name respectively. But when I try to compile the bea using ejbc I get the following error :

    org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean" allows no furt
    her input; "transaction-isolation" is not allowed.
            at java.lang.Throwable.fillInStackTrace(Native Method)
            at java.lang.Throwable.fillInStackTrace(Compiled Code)
            at java.lang.Throwable.<init>(Compiled Code)
            at java.lang.Exception.<init>(Compiled Code)
            at org.xml.sax.SAXException.<init>(SAXException.java:38)
            at org.xml.sax.SAXParseException.<init>(SAXParseException.java:46)
            at com.sun.xml.parser.Parser.error(Parser.java:2775)
            at com.sun.xml.parser.ValidatingParser$ChildrenValidator.consume(Compile
    d Code)


    I use stateless session bean and BMP entity bean, both having Container transaction. Please throw some more light on syntax and the position where transaction-isolation parameter should be added.

    Thanks
    AJP