Questo contenuto non è disponibile nella lingua selezionata.
1.7. The Service Binding Manager
JBoss server uses various ports for the services that it provides (for example, port 8080 for HTTP, 1099 for JNDI). The Service Binding Manager (SBM) service provides a centralized location where settings for all services that need to bind to ports can be configured. SBM can be used to configure different sets of port bindings for a server instance. A system property on the SBM controls which named set (for example, ports-default, ports-01) is used by a particular server instance. If you want to run multiple server instances on the same system then you can configure the SBM on each instance to use a different named binding set. You can even use SBM to switch to a different binding set (for example, 8180 port for HTTP instead of the default 8080) for a server instance.
In a typical configuration, the
ports-default set uses the standard ports (for example, JNDI on port 1099), with ports-01 increasing each port value by 100 (for example, JNDI on 1199), ports-02 by 200 and so on.
SBM is configured through the
$JBOSS_HOME/server/$PROFILE/conf/bindingservice.beans/ META-INF/bindings-jboss-beans.xml file. The configuration of the ServiceBindingManager involves three primary elements :
- A set of beans containing standard (default) binding configuration data. These are the base values (for example, JNDI on 1099) used to drive
ports-default,ports-01and so on. - A number of beans defining
ServiceBindingSets, for example,ports-default,ports-01,ports-02. The sets of standard bindings are combined with each of these, along with an offset value (for example, 100 forports-01) that should be applied to the standard port values to create the binding values for that set. - The
ServiceBindingManagerservice bean itself. This has the standard bindings and theServiceBindingSetsinjected into it. It is also configured with the name of the binding set the particular server instance should use. The name of the binding set to be used is configurable from the command line by using the system property jboss.service.binding.set. The default value isports-default.Copy to Clipboard Copied! Toggle word wrap Toggle overflow To switch to a different set of ports than the ones used by default, you can start the server by passing the -Djboss.service.binding.set property to the run command as follows:./run.sh -Djboss.service.binding.set=ports-01
./run.sh -Djboss.service.binding.set=ports-01Copy to Clipboard Copied! Toggle word wrap Toggle overflow This will instruct the server to use the group of ports configured in theports-01binding set.