I need to run multiple(more than 4) instances of JBoss server on a single machine. I am using JBoss 4.2.3 GA.
相关问题
- How to get Spring to wire my JmsComponent
- Browser cache files not getting updated after a ne
- SSL redirection from Apache to Wildfly
- JPA LazyInitializationException when returning a J
- Deployment order in Jboss 5
相关文章
- Intermittent “sslv3 alert handshake failure” under
- What versions of Jackson are allowed in JBoss 6.4.
- jboss war deployed listener
- JBoss AS 5 database connection pool re-connect rou
- JBPM 6.2. How to deploy a workflow directly from E
- How do I tell JBoss 4.2.3.GA to load jars in my wa
- Sticky session not working with multiple apache vh
- JBoss 7.1, JSF, RichFaces - rich components don
We can easily do this on JBOSS EAP For first instance, just start the JBOSS as it is.
for the second instance, Copy the JBOSS home folder to a different location.
go to standalone/configuration/standalone.xml. go to the section(at bottom of the file) and set port-offset value to some value(EX: 10000) which doesn't have any port binding issue on currently running application. Here the default port-offeset value is 0.
start the second instance as usual .
Running multiple instances of JBoss on the same server:
mbean code="org.jboss.services.binding.ServiceBindingManager"
in this configuration file. c. By default this xml tag is commented. We have to uncomment it and change the value ports-00 to ports-01.In the same file, Under "Socket transport Connector", in the "Configuration" section, serverBindPort must be changed to another value or it will conflict with the default (4446).
...
In
default2/deploy/ejb3.deployer/META-INF/jboss-service.xml
, for the remoting.transport.Connector mbean, port 3873 must be changed to another value or it will conflict with the default.In default2\deploy\jboss-web.deployer\server.xml
set redirect port value to the one configured in step 4
Also, the port value configured in step 5
In summary, the directory structure for setting up two other instances would be something like the below with modifications in the filenames in bold.
$JBOSS_HOME/server/default
$JBOSS_HOME/server/default2
$JBOSS_HOME/server/default2/conf/jboss-service.xml
$JBOSS_HOME/server/default2/deploy/ejb3.deployer/META-INF/jboss-service.xml
$JBOSS_HOME/server/default2/deploy/jboss-web.deployer/server.xml**
$JBOSS_HOME/server/default3
$JBOSS_HOME/server/default3/conf/jboss-service.xml
$JBOSS_HOME/server/default3/deploy/ejb3.deployer/META-INF/jboss-service.xml
$JBOSS_HOME/server/default3/deploy/jboss-web.deployer/server.xml**
7.From command prompt go to the bin folder and run the instances with cmd:
run -c instancename
In this case, it is: run -c default2
And applications accessed with url’s like:
Note: We can go for maximum of 3 instances with this way. To run more than this we have to add some more running tags in JBOSS_HOME\docs\examples\binding-manager\sample-bindings.xml.
Create multiple loopback adapters and bind each ip address to different instance.
No need of changing port.
RK
The quickest and easiest way that comes into mind is simply configuring multiple IP addresses to the hosting machine. Then you can use the different IP addresses to bind to each instance. Doing this means you don't have to change any default ports and allows for an easier environment to manage.
You can make things a lot simpler by simply changing the IP that the server is bound to.
You will need to copy the entire jboss folder several times and configure run.bat to use the -b parameter on startup.
If this is a Windows server and you're running jboss as a service, you might want to edit the service.bat for each instance too so that the servers all have different names in the services control panel.
Part of the problem we ran into when trying to use different HTTP ports was that jboss uses 'lots' of ports for different purposes and it was a pain to edit all of these port numbers to be unique on each instance. By changing the bind address you can avoid this problem entirely.
1) Copy the default folder with new name: instance name
2) In jboss-service.xml Uncomment the ServiceBindingManager mbean and change the ServerName to ports-01 or 02 or 03 e.g:ports-01 and ports-01/02/03 configuration should be there in sample-bindings.xml(present in docs/examples/binding-manager) And make the changes in all the ports mentioned under ports-01/02/03 tags, So that ports will not get conflict. Remember the server will run on the binding port like 8080/8180/8182.
from cmd promt go to the bin folder and run the instances with cmd:
run -c instancename