0 Replies Latest reply on Oct 12, 2008 12:53 PM by vanyatka

    Advice on Transaction Demarcation needed

    vanyatka

      Hi all,

      There is an MDB. It calls a facade method on some SLSB and in case exception happens it catches it and sends a JMS Message (we're using standalone ActiveMQ).

      The pesky problem is that the message is not sent because the current transaction is in the "rolling back" state. It seems I need to use a separate transaction for sending message.

      I tried using

      @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
       public void sendStatusMessage(String messageText, Destination dest) throws JMSException {


      unfortunately it doesn't work. If the facade method rolls back its transaction the activeMQ transaction also fails.

      Can anybody suggest the solution?
      Thanks, Ivan