天天看點

bboss persistent事務管理介紹 (八)

<method name="testTXWithSpecialExceptions">

              <rollbackexceptions>

                  <exception class="com.chinacreator.spi.transaction.RollbackInstanceofException"

                  type="INSTANCEOF"/>

                  <exception class="com.chinacreator.spi.transaction.Exception1"

                  type="IMPLEMENTS"/>

              </rollbackexceptions>

              <param type="java.lang.String"/>

           </method>

           <method name="testTXWithInstanceofExceptions">

           <method name="testTXWithImplementsofExceptions">

           <!--

                  如果涉及的方法名稱是一個正規表達式的比對模式,則無需配置方法參數

                  如果指定的方法沒有參數則無需指定參數

                  注意參數出現的位置順序和實際方法定義的參數順序保持一緻

                  模式為* 表示比對所有的方法

              -->

              通過模式方法進行聲明式事務控制,同時聲明了需要復原事務的異常

              pattern【testPatternTX[1-9.]*】表示以testPatternTX開頭的所有方法

            -->

           <!--<method pattern="testPatternTX[1-9.]*">

           </method>-->        

           <!--   通過模式方法進行聲明式事務控制

              pattern【testPatternTX[1-9.]*】表示以testPatternTX開頭的所有方法      

               -->  

           <method pattern="testPatternTX[1-9.]*">             

              系統級别的異常java.lang.NullPointException,導緻事務復原

           <method name="testSystemException">   

               <!--

       </transactions>

    </manager>

</manager-config>

繼續閱讀