There is a file called
${JBOSS_HOME}/docs/examples/binding-manager/sample-bindings.xml.
This file specifies a number of jboss port configurations such as ports-default, ports-01, and ports-02. Please note, however, that the number of port configurations is less than the number of groups in the class using the installed version of jboss. Therefore, create your own configuration, following the conventions (increment the second digit of each port number in the configuration, i.e., ports-default specifies port 8080 for the web server, ports-01 specifies 8180, and ports-02 specifies 8280). Update the value of each of the ports in the configuration, not just port 8080.
To use a port configuration from sample-bindings.xml, make a few modifications to the file ${JBOSS_HOME}/server/conf/jboss-service.xml. Find the section of the file that looks like the XML code below. Note that is the close comment character. Therefore, notice that this section is currently entirely commented out. Instead, you want only the textual description to be commented out and uncomment the remaining part. Once the XML code is uncommented, you should specify the port configuration that you want to use. By default, once this code is uncommented, the system will use the ports-01 configuration. Instead, choose the port configuration that you want from your modified sample-bindings.xml file.
<!--
Binding service manager for port/host mapping. This is a sample config that demonstrates a JBoss instances with a server name 'jboss1' loading its bindings from an XML file using the ServicesStoreFactory implementation returned by the XMLServicesStoreFactory.
ServerName: The unique name assigned to a JBoss server instance for lookup purposes. This allows a single ServicesStore to handle mulitiple JBoss servers.
StoreURL: The URL string passed to org.jboss.services.binding.ServicesStore during initialization that specifies how to connect to the bindings store.
StoreFactory: The org.jboss.services.binding.ServicesStoreFactory interface implementation to create to obtain the ServicesStore instance.
<mbean code="org.jboss.services.binding.ServiceBindingManager" name="jboss.system:service=ServiceBindingManager">
<attribute name="ServerName">ports-01</attribute>
<attribute name="StoreURL">../docs/examples/binding-manager/sample-bindings.xml</attribute>
<attribute name="StoreFactoryClassName">
org.jboss.services.binding.XMLServicesStoreFactory
</attribute>
</mbean>
-->
Thats all!!... Now run your server :)
In case if the server throws the following exception during startup
org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.services.binding.ServiceBindingManager; - nested throwable: (java.lang. ClassNotFoundException: No ClassLoaders found for: org.jboss.services.binding.ServiceBindingManager) at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
In order to resolve the problem copy the file bindingservice-plugin.jar from the directory JBOSS_HOME/server/standard/lib to the directory JBOSS_HOME/server/lib or JBOSS_HOME//lib .
No comments:
Post a Comment