Hi,

How to get the original Exception that have generate a rollback in a
Statefull SessionBean "bean-managed transaction" ?

I've a SessionBean that do:

    try {
        UserTransaction tx = ...;
        tx.begin();
        ... setXXXX on an Entity BMP that
            generate SQLException in later call
            to ejbStore.
        tx.commit();
    } catch (javax.transaction.RollbackException ex) {
      println("RollbackException: " + ex.getMessage());
    } .....


I can see that next to the transaction commit:
  1. orion call ejbStore()
  2. ejbStore() try to update the data base
        => SQLException with message
        => throw EJBException that wrap the SQLException...
  3. my SSB catch javax.transaction.RollbackException
  4. BUT this Exception doesn't contain any message !

Is it conforme to the spec?? If yes, how to get a message from the exception
that generate the rollback ???

Thank's for help.



Reply via email to