0 Replies Latest reply on Feb 17, 2003 6:59 AM by Florin Duroiu

    'Supports' transaction attribute and a rollback condition

    Florin Duroiu Newbie

      Hi,
      I have a question regarding the transaction attributes and Jboss behaviour. Here's my configuration:
      Jboss 2.4.10
      Oracle 8i
      P6Spy driver to log the DB calls
      EJB application combining around 50 beans (EJB 1.1)

      Now, if I set the transaction attribute to Supports for a finder method belonging to a CMP entity bean, the p6spy reports a rollback after the specific SELECT statement (I suspect other methods with the 'Supports' tx attribute or more generraly, the unspecified tx context as defined in EJB 1.1 spec section 11.6.3, behave the same way). In fact, I have lots of places in which the Supported transaction attribute is used and I have observed that a rollback occures in such situations. However, no error condition is reported either by the container or the database and the application behaves as expected (that's why I have discovered this so late).

      My question is: is this a correct behaviour? Why the plain select statements could not be executed without a transactional context, thus avoiding an unnecessary rollback?
      I can only guess that the rollback itself takes some time to to execute and this is in my oppinion a complete unnecessary action.

      This post also relates to one earlier on a related subject:
      http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ idea/thought would be greatly appreciated.

      florin