jboss4.0.5GA部署EJB问题集锦

  

操作系统版本:RedHat Linux 9

JDK :<st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">1.4.2</st1:chsdate>_14

JBOSS:<st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">4.0.5</st1:chsdate>GA

MYSQL:<st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">5.0.41</st1:chsdate>

<o:p> </o:p>

步骤:
1
、用vmware安装linux,并在linux中开通samba服务,将文件传入linux

2、安装JDKJBOSSMYSQL,设置MYSQL自启动,另外再介绍;

3、部署Mxidea应用。

<o:p> </o:p>

部署Mxidea详细步骤:

1、  jboss-<st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">4.0.5</st1:chsdate>.GA-src.tar.gz解包并编译出JBOSS,设置环境变量;

2、  拷贝etc$JBOSS_HOME/bin目录下;

3、  $JBOSS_HOME/server/default/deploy下建立app目录,将数据源配置文件mysql-ds.xmleshore-destinations-service.xml拷贝到app目录中,如果需要mysqloraclexa数据源支持,要将oraclejdbc驱动ojdbc14.jar拷贝到$JBOSS_HOME/server/default/lib

4、  拷贝后台应用JCFServerEAR.earapp目录,并在前面加01

5、  拷贝前台应用到app目录,并在前面加02

6、  解决jboss log4j问题:修改server\default\conf下的jboss-service.xml

61

   <mbean code="org.jboss.logging.Log4jService"

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

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

      <attribute name="ConfigurationURL">resource:log4j.xml</attribute>

      <!-- Set the org.apache.log4j.helpers.LogLog.setQuiteMode. As of log4j<st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">1.2.8</st1:chsdate>

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

      appender level. See bug#696819.

      -->

          <attribute name="CatchSystemOut">false</attribute><o:p></o:p>

      <attribute name="Log4jQuietMode">true</attribute>

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

      <attribute name="RefreshPeriod">60</attribute>

   </mbean>

<o:p> </o:p>

62 针对EJB

<attribute name="CallByValue">true</attribute>

6.3 针对oracle

   <mbean code="org.jboss.tm.XidFactory"

      name="jboss:service=XidFactory">

      <attribute name="Pad">true</attribute><o:p></o:p>

   </mbean>

6.4 事务

   <mbean code="org.jboss.tm.TransactionManagerService"

      name="jboss:service=TransactionManager"

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

      <attribute name="TransactionTimeout">600</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>

<o:p> </o:p>

65 加载顺序 改用PrefixDeploymentSorter

      <!--

      <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute>

      -->

     

      <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute><o:p></o:p>

      

7、  <o:p> </o:p>

/server/default/jbossweb-tomcat55.sar/META-INF/jboss-service.xml 中的以下两个条目改成true

<attribute name="Java2ClassLoadingCompliance">false</attribute>
<attribute name="UseJBossWebLoader">true</attribute>
<o:p></o:p>

8、  server\default\deploy\ear-deployer.xml修改以下条目

   <mbean code="org.jboss.deployment.EARDeployer"

      name="jboss.j2ee:service=EARDeployer">

      <!-- A flag indicating if ear deployments should have their own scoped

      class loader to isolate their classes from other deployments.

      -->

      <attribute name="Isolated">true</attribute>

      <!-- A flag indicating if the ear components should have in VM call

      optimization disabled.

      -->

      <attribute name="CallByValue">true</attribute>

   </mbean>

<o:p> </o:p>

编辑conf/jboss-service.xml 然后修改 CallByValue  的值为 'true'

9、  替换jboss版本的hibernate,要版本一致,否则抛版本不对的异常;

<o:p> </o:p>

Tomcat 中文字符集问题解决

      <!-- A HTTP/1.1 Connector on port 8080 -->

      <Connector port="8081" address="${jboss.bind.address}"

         maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"

         emptySessionPath="true"

         enableLookups="false" redirectPort="8443" acceptCount="100"

         connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>

<o:p> </o:p>

      <!-- Add this option to the connector to avoid problems with

          .NET clients that don't implement HTTP/1.1 correctly

         restrictedUserAgents="^.*MS Web Services Client Protocol 1.1.4322.*$"

      -->

      

      <!-- A AJP 1.3 Connector on port 8009 -->

      <Connector port="8009" address="${jboss.bind.address}"

         emptySessionPath="true" enableLookups="false" redirectPort="8443"

         protocol="AJP/1.3" URIEncoding="UTF-8"/>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值