Run multiple JBoss services on Linux

Source: Internet
Author: User

When multiple JBoss services are started on one service, the ports may conflict. If you modify the default ports one by one, it will be complicated; for this reason, JBoss provides a unified method for managing multiple instances (servicebindingmanager), the basic idea is that JBoss provides a server port binding file-xxx-bindings.xml, it defines multiple ports marked by server-name, which serves as a unified port binding configuration file. Then register a port binding service servicebindingmanager in the jboss-server.xml of each server instance, which uses parameters:
Servername: Specifies the port configuration for the xxx-bindings.xml
Storeurl: Specifies the location of the xx-bindings.xml File
Once the service is registered, the port settings of server. xml under Tomcat are ignored, and the new port configuration is enabled.

Implementation steps:
1. copy the docs \ examples \ binding-Manager \ sample-bindings.xml file to the server, rename it as a server-bindings.xml, the file has built-in port binding for four servers, so by default, you can enable at least four JBoss service instances.

2. In the JBoss \ Server \ Default \ conf \ jboss-service.xml file

<Mbean code = "org. JBoss. Services. Binding. servicebindingmanager"
Name = "JBoss. System: service = servicebindingmanager">
<Attribute name = "servername"> ports-01 </attribute>
<Attribute name = "storeurl" >$ {JBoss. Home. url}/Server/cod-bindings.xml </attribute>
<Attribute name = "storefactoryclassname">
Org. JBoss. Services. Binding. xmlservicesstorefactory
</Attribute>
</Mbean>

Remove comments and modify the name = servername values, including posts-default, posts-01, posts-02, and posts-03.

You can query port values for ports-01 In the cod-bindings.xml (if the file does not exist, copy the same version to the appropriate directory ).
3. Start each service instance. Run. Bat-C default:

./Run. Sh-C default-B 0.0.0.0

Background startup: nohup./run. Sh-C default-B 0.0.0.0>/dev/null &

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.