Handling transaction

Discussions

EJB design: Handling transaction

  1. Handling transaction (1 messages)

    Hi !
    I have a stateless session bean calling a BMP entity bean, with the transaction attrubute set to "Required". In my business method of session bean, I perform two operations :
    1. Lookup entity bean, find by criteria and call the business method of entity bean, which inturn updates a table.
    2. In the same business method, I update another table.

    But I get TransactionRollBackException. Is there any way to handle the transaction, that is since it is BMP, the transaction has to be handled by the bean. Is there any method like commit or rollback for the transaction to be used in the business method. If yes then in which bean (session or entity bean), it should be implemented and what is the syntax. Early reply is appreciated.

    Thanks
    AJP
  2. Handling transaction[ Go to top ]

    The entity bean CANNOT use BMT, it is not allowed. If it's a BMP that shouldn't matter.

    It sounds like an error is occuring in your entity bean, which is causing it to rollback the transaction.

    I can't work out exactly what you are trying to do based on the initial explanation, could you give a bit more detail?

    I'll try to figure it out from there. ;-)

    Chz

    Tony