Sealyu

          --- 博客已遷移至: http://www.sealyu.com/blog

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks
          <2009年5月>
          262728293012
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          常用鏈接

          留言簿(14)

          隨筆分類

          隨筆檔案

          友情鏈接

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          這兩天在作seam的時候不時遇到“org.jboss.util.NestedSQLException: Transaction is not active”的錯誤信息,后來到jboss的wiki上發現了問題的原因和解決方法:

          How do I set the Transaction Timeout?

          Transaction timeout (unit is always seconds) can be configured in various ways:

          This argument is the same no matter if you are using JBossTM(<=4.0.5) or JBossJTA-Arjuna(>=4.2).

          • Globally: You can change this behavior globally by modifying the TransactionManagerService in /conf/jboss-service.xml (or /deploy/jta-service.xml for 4.0.3)

          Version <= 4.0.5

          This part is the same for either JBossTM or JBossJTA and is the same for ejb2 and ejb3

          • Per-method basis: Modifying the <transaction-timeout> element inside the <method> element of a session or entity bean. This is located in the META-INF/jboss.xml deployment descriptor of a session bean. When the transaction timeout is specified at the method level, it overrides the default timeout. Further information about this element can be found in jboss-x.x.x/docs/dtd/jboss_4_0.dtd. Example taken from the testsuite:

          • Using BMT: Calling javax.transaction.UserTransaction.setTransactionTimeout(int seconds). Please, be aware that this only applies to transactions started after this invocation on the same thread. Example:

          @TransactionTimeout(1500)


          posted on 2009-05-18 10:01 seal 閱讀(2332) 評論(0)  編輯  收藏 所屬分類: Java基礎 、web服務器 、Seam
          主站蜘蛛池模板: 湖北省| 黄冈市| 大石桥市| 云南省| 利津县| 塔城市| 桐庐县| 屏山县| 城步| 嘉黎县| 栾城县| 威宁| 武强县| 隆林| 铜川市| 南郑县| 平武县| 阳西县| 沭阳县| 北川| 江永县| 合肥市| 滦南县| 安化县| 嫩江县| 山东| 柳江县| 太原市| 莱西市| 平顺县| 永城市| 水城县| 克山县| 封丘县| 蒲城县| 那曲县| 阿合奇县| 内丘县| 福海县| 平罗县| 长阳|