程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> JAVA編程 >> 關於JAVA >> JBoss中使用EJB有狀態bean鈍化時間設置

JBoss中使用EJB有狀態bean鈍化時間設置

編輯:關於JAVA

JBoss中使用EJB有狀態bean鈍化時間設置:

修改 standardjboss.xml 文件

<container-configuration>
   <container-name>Standard Stateful SessionBean</container-name>
   <call-logging>false</call-logging>
   <invoker-proxy-binding-name>stateful-rmi-invoker</invoker-proxy-binding-name>
   <container-interceptors>
    <interceptor>
      org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
    </interceptor>
    <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
    <!-- CMT -->
    <interceptor transaction="Container">
      org.jboss.ejb.plugins.TxInterceptorCMT
    </interceptor>
    <interceptor transaction="Container">
      org.jboss.ejb.plugins.CallValidationInterceptor
    </interceptor>
    <interceptor transaction="Container">
     org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor
    </interceptor>
    <!-- BMT -->
    <interceptor transaction="Bean">
       org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor
    </interceptor>
    <interceptor transaction="Bean">
       org.jboss.ejb.plugins.TxInterceptorBMT
    </interceptor>
    <interceptor transaction="Bean">
       org.jboss.ejb.plugins.CallValidationInterceptor
    </interceptor>
    <interceptor>
       org.jboss.resource.connectionmanager.CachedConnectionInterceptor
    </interceptor>
    <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
   </container-interceptors>
   <instance-cache>
    org.jboss.ejb.plugins.StatefulSessionInstanceCache
   </instance-cache>
   <persistence-manager>
    org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager
   </persistence-manager>
   <container-cache-conf>
    <cache-policy>
      org.jboss.ejb.plugins.LRUStatefulContextCachePolicy
    </cache-policy>
    <cache-policy-conf>
     <min-capacity>50</min-capacity>
     <max-capacity>1000000</max-capacity>
     <remover-period>1800</remover-period>
     <max-bean-life>1800</max-bean-life>
     <overager-period>300</overager-period>
     <max-bean-age>600</max-bean-age> '默認時間為600秒,修改為自己需要的
     <resizer-period>400</resizer-period>
     <max-cache-miss-period>60</max-cache-miss-period>
     <min-cache-miss-period>1</min-cache-miss-period>
     <cache-load-factor>0.75</cache-load-factor>
    </cache-policy-conf>
   </container-cache-conf>
   <container-pool-conf>
    <MaximumSize>100</MaximumSize>
   </container-pool-conf>
  </container-configuration>

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved