1 Reply Latest reply on Jan 28, 2011 5:33 AM by Tom Fennelly

    Rollback SmooksAction, not the whole transaction?

    Michael Burman Newbie

      Hi,

       

      Consider this process:

       

      Smooks splits a batch file to individual messages and then routes them forward to another service. Something is wrong at the end of the file and SAXParseException is thrown. Smooks encapsulates this SAXParseException to SmooksException and throws it.

       

      What happens in a transacted service is that message is rolledback and thrown again to the current queue. This isn't recoverable error, so it happens for n-times until the JMSQueue throws it to DLQ.

       

      However, this process prevents any sort of ExceptionHandling, since making any database calls from ExceptionHandler would, surprise, cause a rollback to them as well.

       

      On the other hand, if you try to extend the SmooksAction and catch the SmooksException, check for example SAXParseException and throw it out, then you could process it. In that case, all the messages that Smooks already processed are sent forward. This isn't acceptable behaviour either.

       

      So how can I get Smooks messages rolled back but not the overall transaction? Kevin, is it possible to bundle two transactions? Suspending the main transaction, starting a new one, commiting it and then failing would be disasterous as well (duplicates).