事务控制的配置
Jboss事务处理也有相应配置:server/default/conf/jboss-service.xml
|
<mbean code="org.jboss.tm.TransactionManagerService" name="jboss:service=TransactionManager" xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml"> <attribute name="TransactionTimeout">300</attribute> <!—— set to false to disable transaction demarcation over IIOP ——> <attribute name="GlobalIdsEnabled">true</attribute> <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends> <!—— Transaction Integrity Checking ——> <!—— Force a rollback if another thread is associated with the transaction at commit ——> <!——depends optional-attribute-name="TransactionIntegrityFactory" proxy-type="org.jboss.tm.integrity.TransactionIntegrityFactory"> <mbean code="org.jboss.tm.integrity.FailIncompleteTransaction" name="jboss:service=TransactionManager,plugin=TransactionIntegrity"/> </depends——> </mbean> |
如果要一台机器使用多个jboss server那么需要修改的文件server/default/conf/jboss-service.xml server/default/deploy/jbossweb-tomcat55.sar/server.xml
server/default/deploy/jbossweb-tomcat55.sar/server.xml配置要点
|
<Connector port="8080" address="${jboss.bind.address}" maxThreads="250" strategy="ms" maxHttpHeaderSize="8192" emptySessionPath="true" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="GBK"/> |
注:acceptCount是排队请求的数量;应该将线程数(最大线程数)设置比最大预期负载(同时并发的点击)多25%(经验规则);应该将minSpareThread设置比正常负载多一些;
应该将maxSpareThread设置比峰值负载多一些;
minSpareThread指“启动以后,总是保持该数量的线程空闲等待”;
maxSpareThread指“如果超过了minSpareThread,然后总是保持该数量的线程空闲等待”
删除不需要的valve和日志;如果不使用JBoss的安全,删除JBoss的安全valve;预编译JSP(内置的编译器编译速度相当快,对于小的站点就没有必要预先编译了)
关闭sever/slim/jbossweb-tomcat50.sar/conf/web.xml中的development模式;URIEncoding="GBK" 基本解决了乱码问题
安全连接配置
|
<!—— SSL/TLS Connector configuration using the admin devl guide keystore ——> <Connector port="8443" address="${jboss.bind.address}" maxThreads="100" strategy="ms" maxHttpHeaderSize="8192" emptySessionPath="true" scheme="https" secure="true" clientAuth="false" keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore" keystorePass="changeit" sslProtocol = "TLS" /> |
共2页 1 2






