2 Replies Latest reply on Jan 4, 2007 9:04 AM by Neil Curzon

    Different behaviour when throwing exceptions out of EJBs com

    Neil Curzon Newbie

      Sorry for bothering, but I seem to have another dumb question.

      We have a simple distributed application inserting a name into a database. We're using:
      * Session beans
      * Container managed-transaction
      * mysql

      We expect that both servers (serverLocal and serverRemote) will rollback when an error occurs in either serverLocal or serverRemote.

      When we try throwing a system exception (i.e. RuntimeException or EJBException) we find that the transaction on serverRemote never completes (i.e. it doesn't rollback). As a result, we still have an open connection when the test terminates.

      However when we explicitly set the rollback (and don't throw any exceptions), the system correctly rolls back and connections are released.


      The Question:
      Is this JBoss's expected behaviour?


      Thanks again in advance.