3 Replies Latest reply on Jul 23, 2003 6:04 PM by Kris Kristensen

    Jboss halts when using transaction-attribute not-supported

    Kris Kristensen Newbie

      Env.
      Win2k, JDK 1.4.x
      JBossweb 3.0.6
      Firebird 1.x/MySQL 4.x

      Scenario:
      - 1 Session bean using 4 entity beans
      - All beans are using container managed transactions, incl. the session bean.
      - The method (entry point) in the session bean has the transaction property set
      to 'Required' and this method is using different finder methods on the entity
      beans and creating instances of the 4 different entities.

      The entity beans have the following transaction properties;
      - All finder methods have the transaction attribute set to 'Supports'
      - 3 of the entites have their the transaction attribute in the ejbCreate
      methods set to 'Required'
      - 1 of the entites have the transaction attribute in the ejbCreate
      methods set to 'NotSupported'. This entity is for logging purpose only, and thus
      even if
      the transaction fails, all logging done in the process must not be rolled back
      -> transaction attribute set to 'Not Supported'.

      Problem;
      The method (with transaction attr='Required') in the session bean is called and
      it is successfully creating the entity beans with the transaction attribute in
      ejbCreate set to 'Required'. When it tries to create the entity bean with the
      transaction attribute in ejbCreate set to 'NotSupported', the whole process is
      halted and remains hanging for 5 minutes before the transaction gets a timeout
      and is rolled back. This is not the kind of behaviour expected. According to the
      EJB spec the transaction should be suspended while the non- transactional entity
      is created and then resumed after the creation -> leaving the log entries
      persisted to the database even if the transaction should fail.

      Anybody seen this behaviour before, any suggestions ??