0 Replies Latest reply on Jan 21, 2009 7:39 PM by edgecrusher

    Transaction confusion

    edgecrusher

      Hello,


      I'm a Seam noob so please bear with me if there are aspects of Seam transaction management that I don't have a firm grasp on yet.  I've spent the better part of 6 hours trying to understand some transactional behavior that I'm observing.  Some of the problems here maybe due to the architecture that we are using.  In any case here's the scenario: 


      We have a SLSB method that carries a transaction attribute of requires new.  Within the method we are using Seam (POJO) components to help carry out the biz logic.  My assumption here is that the Seam POJO component will participate in the CMT that was started when the SLSB method was entered.  Later in the processing the Seam POJO component throws a Runtime exception which we actually want to handle (unusual I understand but it makes sense in our processing context).  What I'm seeing is that Seam is marking the transaction for rollback when the exception is thrown from the POJO component's method.  My confusion here is that the component where the rollback is occurring is not the demarcated boundary where the transaction began.


      From reading the reference guide I see that the exception and transaction rules from the EJB spec are applied to Seam POJO components.  However it doesn't appear that the transaction demarcation rules of CMT are carried over to these type of components.  I did the @ApplicationException solution and it fixed my problem but I'm still a little confused about the transaction behavior that I'm seeeing based.  So if anyone out there could shed some light on this for me on this issue I would greatly appreciate it.


      Thanks