解决如何在两个JBOSS部署在同一台服务器时端口占用问题。当两个JBOSS部署在同一台服务器上时,需要修改下面的端口值
1, jboss-4.2.2.GA\server\default\deploy\ejb3.deployer\META-INF下打开jboss-service.xml文件
第12行修改3873的端口值
<mbean code=”org.jboss.remoting.transport.Connector”
name=”jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3″>
<depends>jboss.aop:service=AspectDeployer</depends>
<attribute name=”InvokerLocator”>socket://${jboss.bind.address}:3873</attribute>
<attribute name=”Configuration”>
<handlers>
<handler
2, jboss-4.2.2.GA\server\default\deploy\jboss-web.deployer下打开server.xml文件 修改80,8009,8443的端口值
a. 第22行修改80端口;
b. 第25行修改8443端口;
<Connector port=”80″ address=”${jboss.bind.address}”
maxThreads=”250″ maxHttpHeaderSize=”8192″
emptySessionPath=”true” protocol=”HTTP/1.1″
enableLookups=”false” redirectPort=”8443″ acceptCount=”100″
connectionTimeout=”20000″ disableUploadTimeout=”true” URIEncoding=”UTF-8″ />
c. 第39行修改8009端口;
<Connector port=”8009″ address=”${jboss.bind.address}” protocol=”AJP/1.3″
emptySessionPath=”true” enableLookups=”false” redirectPort=”9445″ />
<Engine name=”jboss.web” defaultHost=”localhost”>
3, jboss-4.2.2.GA\server\default\conf下打开jboss-service.xml文件,修改8083,1098,1099,4444,4445,4446的端口值
a. 第210行修改8083端口;
<mbean code=”org.jboss.web.WebService”
name=”jboss:service=WebService”>
<!– The Bind address and Port –>
<attribute name=”BindAddress”>${jboss.bind.address}</attribute>
<attribute name=”Port”>8083</attribute>
<!– The address to use for the host portion of the RMI codebase URL –>
<attribute name=”Host”>${java.rmi.server.hostname}</attribute>
<!– Should non-EJB .class files be downloadable –>
<attribute name=”DownloadServerClasses”>true</attribute>
b. 第257行修改1098端口
<!– The port of the RMI naming service, 0 == anonymous –>
<attribute name=”RmiPort”>1098</attribute>
<!– The RMI service bind address. Empty == all addresses
–>
c. 第251行修改1099的端口值
<attribute name=”Port”>1099</attribute>
d. 第426行修改4444端口值
<mbean code=”org.jboss.invocation.jrmp.server.JRMPInvoker”
name=”jboss:service=invoker,type=jrmp”>
<attribute name=”RMIObjectPort”>4444</attribute>
<attribute name=”ServerAddress”>${jboss.bind.address}</attribute>
e. 第450行修改4445的端口值
<mbean code=”org.jboss.invocation.pooled.server.PooledInvoker”
name=”jboss:service=invoker,type=pooled”>
<attribute name=”NumAcceptThreads”>1</attribute>
<attribute name=”MaxPoolSize”>300</attribute>
<attribute name=”ClientMaxPoolSize”>300</attribute>
<attribute name=”SocketTimeout”>60000</attribute>
<attribute name=”ServerBindAddress”>${jboss.bind.address}</attribute>
<attribute name=”ServerBindPort”>4445</attribute>
<attribute name=”ClientConnectAddress”>${jboss.bind.address}</attribute>
<attribute name=”ClientConnectPort”>0</attribute>
<attribute name=”ClientRetryCount”>1</attribute>
<attribute name=”EnableTcpNoDelay”>false</attribute>
f. 第510行修改4446的端口值
<attribute name=”socketTimeout” isParam=”true”>600000</attribute>
<attribute name=”serverBindAddress”>${jboss.bind.address}</attribute>
<attribute name=”serverBindPort”>4446</attribute>
4, jboss-4.2.2.GA\server\default\conf打开jboss-minimal.xml文件,修改1099的端口值,与第3步中的修改一致
第76行修改1099的值
<attribute name=”Port”>1099</attribute>
5,jboss-4.2.2.GA\server\default\deploy\jms下打开uil2-service.xml,修改8093的端口值
第22行修改8093的端口值
<attribute name=”ServerBindPort”>8093</attribute>
转自:http://wenku.baidu.com/link?url=vFGvJ9fzPG6AvbPa1CsDSuySEWGPmxsVdz6yGGvT_4jS4lHYQHqVGjdyjg9JA2lUGjykL1vxFvB7IRmje_EfabrqM2o-o83-S9iqpDmbZ8i