Sunday, August 10, 2014

create multiinstatnce of jboss

Setting Multiple Instances for JBoss-4.2.3 GA

Posted: July 24, 2009 in Server
1
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 nameInitial PortModified Port
jboss-service.xml
jboss:service=Naming109911099
jboss:service=WebService808318083
jboss:service=invoker ,type=jrmp444414444
jboss:service=invoker ,type=pooled444514445
cluster-service.xml
jboss:service=invoker,type=jrmpha444414444
jboss:service=HAJNDI110011100
jboss:service=invoker,type=pooledha444814448
iiop-service.xml
jboss:service=CorbaORB352813528
jmx-rmi-adaptor.sar
jboss.jmx:type=Connector,name=RMI900119001
snmp-adaptor.sar
jboss.jmx:name=SnmpAgent,service=trapd,type=logger116211162
jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor116111161
jbossmq-service.xml
jboss.mq:service=InvocationLayer,type=UIL2809318093
jbossmq-httpil.sar
jboss.mq:service=InvocationLayer,type=HTTP80808888
hajndi-jms-ds.xml
jboss.mq:service=JMSProviderLoader, name=HAJNDIJMSProvider110011100
http-invoker.sar & httpha-invoker.sar
jboss:service=invoker,type=http80808888
jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
Also change the port for attribute InvokerLocator to the modified port
387313873
jboss:service=invoker,type=http,target=Naming80808888
jboss:service=invoker,type=http,target=Naming,readonly=true80808888
httpha-invoker.sar
jboss:service=invoker,type=httpHA80808888
jboss:service=invoker,type=http,target=HAJNDI80808888
jboss-ws4ee.sar
jboss.ws4ee:service=AxisService80808888
Remoting
jboss.remoting:service=Connector,transport=socket444614446
Tomcat
jboss.web:service=WebServer
Also change the port for 1st when condition to the modified port
80808888
jboss messaging
jboss.messaging:service=Connector,transport=bisocket
Also change the attribute serverBindPort to the modified port
445714457
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]

1 comment:

  1. Are you trying to earn money from your visitors with popup advertisments?
    If so, did you take a look at Clickadu?

    ReplyDelete