Setting Multiple Instances for JBoss-4.2.3 GA
Posted: July 24, 2009 in Server
Copy the file <jboss-folder>/docs/examples/binding-manager/sample-bindings.xml to the location <jboss-folder>
Rename the file sample-bindings.xml in your to port-bindings.xml
Changes in port-bindings.xml file
Define the server name and the port : By default, we will have one ports-default. Define your new server instance based on the default port (say its port-01).
<server name=”port-01“>
Make sure the default ports for all the services are changed from default.
service-config name Initial Port Modified Port
jboss-service.xml
jboss:service=Naming 1099 11099
jboss:service=WebService 8083 18083
jboss:service=invoker ,type=jrmp 4444 14444
jboss:service=invoker ,type=pooled 4445 14445
cluster-service.xml
jboss:service=invoker,type=jrmpha 4444 14444
jboss:service=HAJNDI 1100 11100
jboss:service=invoker,type=pooledha 4448 14448
iiop-service.xml
jboss:service=CorbaORB 3528 13528
jmx-rmi-adaptor.sar
jboss.jmx:type=Connector,name=RMI 9001 19001
snmp-adaptor.sar
jboss.jmx:name=SnmpAgent,service=trapd,type=logger 1162 11162
jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor 1161 11161
jbossmq-service.xml
jboss.mq:service=InvocationLayer,type=UIL2 8093 18093
jbossmq-httpil.sar
jboss.mq:service=InvocationLayer,type=HTTP 8080 8888
hajndi-jms-ds.xml
jboss.mq:service=JMSProviderLoader, name=HAJNDIJMSProvider 1100 11100
http-invoker.sar & httpha-invoker.sar
jboss:service=invoker,type=http 8080 8888
jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
Also change the port for attribute InvokerLocator to the modified port 3873 13873
jboss:service=invoker,type=http,target=Naming 8080 8888
jboss:service=invoker,type=http,target=Naming,readonly=true 8080 8888
httpha-invoker.sar
jboss:service=invoker,type=httpHA 8080 8888
jboss:service=invoker,type=http,target=HAJNDI 8080 8888
jboss-ws4ee.sar
jboss.ws4ee:service=AxisService 8080 8888
Remoting
jboss.remoting:service=Connector,transport=socket 4446 14446
Tomcat
jboss.web:service=WebServer
Also change the port for 1st when condition to the modified port 8080 8888
jboss messaging
jboss.messaging:service=Connector,transport=bisocket
Also change the attribute serverBindPort to the modified port 4457 14457
Table 1: Modified Port
- In <jboss-folder>/server, duplicate the default server folder and rename it to the server name you mentioned inport-bindings.xml (In our case: port-01).
- Open <new server folder:port-01>/conf/jboss-service.xml.
- Edit service binding portion as shown below
- Define server name based on the specified in port-binding.xml
- Update url to file:../port-bindings.xml depends on where you put the port-bindings.xml file.
<mbean code=”org.jboss.services.binding.ServiceBindingManager” name=”jboss.system:service=ServiceBindingManager”>
<attribute name=”ServerName”>port-01</attribute>
<attribute name=”StoreURL”>${jboss.home.url}/port-bindings.xml</attribute>
<attribute name=”StoreFactoryClassName”>org.jboss.services.binding.XMLServicesStoreFactory</attribute>
</mbean>
Table 2: Defining the ServiceBindingManager
- Update port for jboss:service=WebService to the same modified port for jboss:service=WebService in port-bindings.xml
[In our case: Refer Table1: jboss-service.xml -> jboss:service=WebService: Port 18083]
- Update port for jboss:service=NamingBeanImpl to different port than the default one. [Let the port be 11099and RMIPort to 11098]
- Update port for jboss:service=invoker,type=jrmp to the same modified port for jboss:service=invoker,type=jrmp in port-bindings.xml
[In our case: Refer Table1: jboss-service.xml -> jboss:service=invoker,type=jrmp: Port 14444]
- Update port for jboss:service=invoker,type=pooled to the same modified port for jboss:service=invoker,type=pooled in port-bindings.xml
[In our case: Refer Table1: jboss-service.xml -> jboss:service=invoker,type=pooled: Port 14445]
- Update port for jboss.remoting:service=Connector,transport=socket to different port than the default [Let the serverBindPort be 14446]
- Open the file “<new server folder:port-01>/deploy/ejb3.deployer/META-INF/jboss-service.xml and change the port for EJB connector to the same modified port for DefaultEjb3Connector defined in port-bindings.xml
[In our case: Refer Table1: http-invoker.sar & httpha-invoker.sar -> jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3: Port 13873]
- Open the file “<new server folder:port-01>/deploy/http.invoker/META-INF/jboss-service.xml” and update the port for HttpInvoker and HttpProxyFactory to the same modified port for httpInvoker you defined in port-bindings.xml
[In our case: Refer Table1: http-invoker.sar & httpha-invoker.sar -> jboss:service=invoker,type=http: Port 8888]
- Open the file “<new server folder:port-01>/deploy/jboss-web.deployer/server.xml” and update the first connector port to the same modified port for httpInvoker you defined in port-bindings.xml
[In our case: Refer Table1: http-invoker.sar & httpha-invoker.sar ' jboss:service=invoker,type=http: Port 8888]
- To run the default server at port 8080 -> Open the command prompt at location /bin and execute the command run
- Change the server.xml in %JBOSS_HOME%\server\systest1\deploy\jboss-web.deployer
- To run the new port server at port 8888 -> Open the command prompt at location /bin and execute the command run –c [In our case: run –c port-01]
Copy the file <jboss-folder>/docs/examples/binding-manager/sample-bindings.xml to the location <jboss-folder>
Rename the file sample-bindings.xml in your to port-bindings.xml
Changes in port-bindings.xml file
Define the server name and the port : By default, we will have one ports-default. Define your new server instance based on the default port (say its port-01).
<server name=”port-01“>
<server name=”port-01“>
Make sure the default ports for all the services are changed from default.
service-config name | Initial Port | Modified Port |
jboss-service.xml | ||
jboss:service=Naming | 1099 | 11099 |
jboss:service=WebService | 8083 | 18083 |
jboss:service=invoker ,type=jrmp | 4444 | 14444 |
jboss:service=invoker ,type=pooled | 4445 | 14445 |
cluster-service.xml | ||
jboss:service=invoker,type=jrmpha | 4444 | 14444 |
jboss:service=HAJNDI | 1100 | 11100 |
jboss:service=invoker,type=pooledha | 4448 | 14448 |
iiop-service.xml | ||
jboss:service=CorbaORB | 3528 | 13528 |
jmx-rmi-adaptor.sar | ||
jboss.jmx:type=Connector,name=RMI | 9001 | 19001 |
snmp-adaptor.sar | ||
jboss.jmx:name=SnmpAgent,service=trapd,type=logger | 1162 | 11162 |
jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor | 1161 | 11161 |
jbossmq-service.xml | ||
jboss.mq:service=InvocationLayer,type=UIL2 | 8093 | 18093 |
jbossmq-httpil.sar | ||
jboss.mq:service=InvocationLayer,type=HTTP | 8080 | 8888 |
hajndi-jms-ds.xml | ||
jboss.mq:service=JMSProviderLoader, name=HAJNDIJMSProvider | 1100 | 11100 |
http-invoker.sar & httpha-invoker.sar | ||
jboss:service=invoker,type=http | 8080 | 8888 |
jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3 Also change the port for attribute InvokerLocator to the modified port | 3873 | 13873 |
jboss:service=invoker,type=http,target=Naming | 8080 | 8888 |
jboss:service=invoker,type=http,target=Naming,readonly=true | 8080 | 8888 |
httpha-invoker.sar | ||
jboss:service=invoker,type=httpHA | 8080 | 8888 |
jboss:service=invoker,type=http,target=HAJNDI | 8080 | 8888 |
jboss-ws4ee.sar | ||
jboss.ws4ee:service=AxisService | 8080 | 8888 |
Remoting | ||
jboss.remoting:service=Connector,transport=socket | 4446 | 14446 |
Tomcat | ||
jboss.web:service=WebServer Also change the port for 1st when condition to the modified port | 8080 | 8888 |
jboss messaging | ||
jboss.messaging:service=Connector,transport=bisocket Also change the attribute serverBindPort to the modified port | 4457 | 14457 |
Table 1: Modified Port
- In <jboss-folder>/server, duplicate the default server folder and rename it to the server name you mentioned inport-bindings.xml (In our case: port-01).
- Open <new server folder:port-01>/conf/jboss-service.xml.
- Edit service binding portion as shown below
- Define server name based on the specified in port-binding.xml
- Update url to file:../port-bindings.xml depends on where you put the port-bindings.xml file.
- Update port for jboss:service=WebService to the same modified port for jboss:service=WebService in port-bindings.xml
- Update port for jboss:service=NamingBeanImpl to different port than the default one. [Let the port be 11099and RMIPort to 11098]
- Update port for jboss:service=invoker,type=jrmp to the same modified port for jboss:service=invoker,type=jrmp in port-bindings.xml
- Update port for jboss:service=invoker,type=pooled to the same modified port for jboss:service=invoker,type=pooled in port-bindings.xml
- Update port for jboss.remoting:service=Connector,transport=socket to different port than the default [Let the serverBindPort be 14446]
- Open the file “<new server folder:port-01>/deploy/ejb3.deployer/META-INF/jboss-service.xml and change the port for EJB connector to the same modified port for DefaultEjb3Connector defined in port-bindings.xml
- Open the file “<new server folder:port-01>/deploy/http.invoker/META-INF/jboss-service.xml” and update the port for HttpInvoker and HttpProxyFactory to the same modified port for httpInvoker you defined in port-bindings.xml
- Open the file “<new server folder:port-01>/deploy/jboss-web.deployer/server.xml” and update the first connector port to the same modified port for httpInvoker you defined in port-bindings.xml
- To run the default server at port 8080 -> Open the command prompt at location /bin and execute the command run
- Change the server.xml in %JBOSS_HOME%\server\systest1\deploy\jboss-web.deployer
- To run the new port server at port 8888 -> Open the command prompt at location /bin and execute the command run –c [In our case: run –c port-01]
<mbean code=”org.jboss.services.binding.ServiceBindingManager” name=”jboss.system:service=ServiceBindingManager”> <attribute name=”ServerName”>port-01</attribute> <attribute name=”StoreURL”>${jboss.home.url}/port-bindings.xml</attribute> <attribute name=”StoreFactoryClassName”>org.jboss.services.binding.XMLServicesStoreFactory</attribute> </mbean> |
Table 2: Defining the ServiceBindingManager
[In our case: Refer Table1: jboss-service.xml -> jboss:service=WebService: Port 18083]
[In our case: Refer Table1: jboss-service.xml -> jboss:service=invoker,type=jrmp: Port 14444]
[In our case: Refer Table1: jboss-service.xml -> jboss:service=invoker,type=pooled: Port 14445]
[In our case: Refer Table1: http-invoker.sar & httpha-invoker.sar -> jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3: Port 13873]
[In our case: Refer Table1: http-invoker.sar & httpha-invoker.sar -> jboss:service=invoker,type=http: Port 8888]
[In our case: Refer Table1: http-invoker.sar & httpha-invoker.sar ' jboss:service=invoker,type=http: Port 8888]
Are you trying to earn money from your visitors with popup advertisments?
ReplyDeleteIf so, did you take a look at Clickadu?