說明 JBoss EAP 5.0 新增 Nodes,新增的 JBoss Nodes 執行於不同的 JVM。
準備執行環境
主要為JBoss EAP 5.0,預設 Server 已配置這裡不再贅述
- JDK (Java Development Kit) version 1.6
- JBoss Enterprise Application Platform 5.0
JBoss Server Configuration
- 設定系統變數JBOSS_HOME。
- 複製
%JBOSS_HOME%\server\all
,並改名為%JBOSS_HOME%\server\appService
。
- 修改新增的Application Port,之前會用修改
%JBOSS_HOME%\server\appService\deploy\jbossweb.sar\server.xml
的方式;現在改用修改%JBOSS_HOME%\server\appService\conf\bindingservice.beans\META-INF\bindings-jboss-beans.xml
,如下修改line-24
將 ports-default
改為 ports-01
,修改後%JBOSS_HOME%\server\appService
Appliaction 所有的Port將推移100,如8080 -> 8180、8009 -> 8109以此類推。
<!-- Provides management tools with a ProfileService ManagementView
interface to the SBM and its components -->
<bean name="ServiceBindingManagementObject"
class="org.jboss.services.binding.managed.ServiceBindingManagementObject">
<constructor>
<!-- The name of the set of bindings to use for this server -->
<parameter>${jboss.service.binding.set:ports-01}</parameter>
<!-- The binding sets -->
<parameter>
<set>
<inject bean="PortsDefaultBindings"/>
<inject bean="Ports01Bindings"/>
<inject bean="Ports02Bindings"/>
<inject bean="Ports03Bindings"/>
</set>
</parameter>
<!-- Base binding metadata that is used to create bindings for each set -->
<parameter><inject bean="StandardBindings"/></parameter>
</constructor>
</bean>
ports-01
設定如下,line-61、65
都可修改,Port推移100就是這邊的設定: <!-- The ports-01 bindings are obtained by taking the base bindings and adding 100 to each port value -->
<bean name="Ports01Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
<constructor>
<!-- The name of the set -->
<parameter>ports-01</parameter>
<!-- Default host name -->
<parameter>${jboss.bind.address}</parameter>
<!-- The port offset -->
<parameter>100</parameter>
<!-- Set of bindings to which the "offset by X" approach can't be applied -->
<parameter><null/></parameter>
</constructor>
</bean>
- 在
%JBOSS_HOME%
下建立目錄,目錄結構為%JBOSS_HOME%\appService\bin
,並將%JBOSS_HOME%\bin
下所有檔案複製到%JBOSS_HOME%\appService\bin
;%JBOSS_HOME%\appService\bin\run.bat
更名為runAppService.bat
接著如下修改line-136
。
org.jboss.Main -c appService %*
- 接下來修改
%JBOSS_HOME%\server\appService
Appliaction 的console配置,將%JBOSS_HOME%\server\default\conf\props\
路徑下的web-console-roles.properties
、web-console-users.properties
,這二個檔案複製到%JBOSS_HOME%\server\appService\conf\props\
;接著修改此路徑下的jmx-console-users.properties
、web-console-users.properties
只要將第2行開頭的#拿掉即可。
- 設定
UsersRolesLoginModule
的路徑,如下修改%JBOSS_HOME%\server\appService\conf\login-config.xml
,於web-console
加上props
路徑即可。
<!-- A template configuration for the web-console web application. This
defaults to the UsersRolesLoginModule the same as other and should be
changed to a stronger authentication mechanism as required.
-->
<application-policy name="web-console">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="usersProperties">props/web-console-users.properties</module-option>
<module-option name="rolesProperties">props/web-console-roles.properties</module-option>
</login-module>
</authentication>
</application-policy>
- 開啟DOS視窗,切換到路徑
%JBOSS_HOME%\appService\bin
執行runAppService.bat
。
- 開啟Borwser執行以下連結,帳/密輸入 admin/admin。
http://127.0.0.1:8180/web-console/
相關設定可參考:
Jboss5.1+Multi-Apps_Services
JBOSS5配置
沒有留言:
張貼留言