Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1227744
  • 博文数量: 699
  • 博客积分: 6000
  • 博客等级: 准将
  • 技术积分: 4970
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 13:45
文章分类

全部博文(699)

文章存档

2011年(1)

2008年(698)

我的朋友

分类:

2008-10-15 13:45:09

    EOS自带的JBOSS325和目前的JBOSS版本是有不小的区别的,本文主要介绍EOS部署在JBOSS4以上版本的配置技巧

ERROR: invalid console appender config detected, console stream is looping

    1、配置介绍

    日志的配置

    JBOSS4集成了log4j,所以在启动eos后,发现日志出现一下错误:ERROR: invalid console appender config detected, console stream is looping

    这主要是EOS应用自己的   log4j和jboss集成的log4j冲突,解决方法是:

    使用jboss的log4j,转移eos的log配置到jboss的 server/default/conf/log4j.xml里:类似以下配置:

   

   

   

   

   

   

   

   

   

   

   

   

   

    修改server/default/conf/jboss-service.xml

   

    name="jboss.system:type=Log4jService,service=Logging"

    xmbean-dd="resource:xmdesc/Log4jService-xmbean.xml">

    resource:log4j.xml

    false

    <!—— Set the org.apache.log4j.helpers.LogLog.setQuiteMode. As of log4j1.2.8

    this needs to be set to avoid a possible deadlock on exception at the

    appender level. See bug#696819.

    ——>

    true

    <!—— How frequently in seconds the ConfigurationURL is checked for changes ——>

    60

   

    修改server/default/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml

    true

    <!—— A flag indicating if the JBoss Loader should be used. This loader

    uses a unified class loader as the class loader rather than the tomcat

    specific class loader.

    The default is false to ensure that wars have isolated class loading

    for duplicate jars and jsp files.

    ——>

    true

    事务控制的配置

    Jboss事务处理也有相应配置:server/default/conf/jboss-service.xml

   

    name="jboss:service=TransactionManager"

    xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">

    300 <!—— set to false to disable transaction demarcation over IIOP ——>

    true

    jboss:service=XidFactory

    <!—— 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">

    name="jboss:service=TransactionManager,plugin=TransactionIntegrity"/>

   

    如果要一台机器使用多个jboss server那么需要修改的文件server/default/conf/jboss-service.xml server/default/deploy/jbossweb-tomcat55.sar/server.xml

    server/default/deploy/jbossweb-tomcat55.sar/server.xml配置要点

   

    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 ——>

   

    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" />

【责编:Chuan】

--------------------next---------------------

阅读(998) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~