1

I found couple of tutorials how to run multiple instances of JBoss on the same machine.

All of them mention uncommenting Service Binder and having separate service-binding.xml files for each server.

The question is why it's done like that? Is there any reason except adding additional layer of indirection?

It looks the same could be done by modification of ports in jboss-service.xml for each server. The only restriction would be that there won't be easy way to switch which instance of JBoss uses which set of ports.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Victor Ronin
  • 22,758
  • 18
  • 92
  • 184

1 Answers1

2

You are right with modifying the ports in jboss-service.xml. This is the straightforward and genuine way to change the ports.

Unfortunately, ports are not only defined in that file, but also in other places like jboss-web's configuration etc.
Catching all those places can be error prone.

So the idea was to have a central file (service-binding.xml) that lives in the root of a server installation. You basically copy the 'default' config to server1, server2 etc and then via command line pass in the server name when starting so that the correct port-offset for all of the services is taken from service-bindings.xml and applied to the resulting runtime configuration.

JBossAS 7 takes this concept one step further to the ServiceBindingGroups, where the base ports are defined on a domain level and then per server you pick a basic group + just a port offset by name, so that there is even less work needed than in as4

Heiko Rupp
  • 30,426
  • 13
  • 82
  • 119