Is there an easy way to create a new Wildfly server instance.
In JBoss AS5 all you had to do is create a copy of default or all and start jboss with:
run.sh -c [New instance name]
There is no such option available in standalone.sh
Is there an easy way to create a new Wildfly server instance.
In JBoss AS5 all you had to do is create a copy of default or all and start jboss with:
run.sh -c [New instance name]
There is no such option available in standalone.sh
For standalone instances you can use the
--server-config
or-c
option to specify a different configuration. For example, to put JBoss in "clustered" modeOther alternative is used a domain mode configuration, in this mode you can define different profiles, for an different servers instances.
WildFly - Operating modes
WildFly - Domain Setup
The change which started with the JBoss AS7 and continues in WildFly is, the whole server configuration is hold in a single file. There are prepared some 4 default configurations (or profiles):
standalone.xml
- used by default - without clustering and messaging)standalone-ha.xml
- supports clustering)standalone-full.xml
- supports messaging)standalone-full-ha.xml
- supports both messaging and clustering)To use the custom profile start the server with using
-c
switchIf you only need to change the server configuration, you can edit the profile XML files directly, use CLI tool (
jboss-cli.sh/bat
) or management console.If you want to do bigger changes (e.g. different applications in
standalone/deployments
directory), you can copy the wholestandalone
directory and edit each copy as necessary. I use following way for starting two clustered server:This example creates 2 copies from a clean
standalone
configuration and starts a server for each copy. The second server have port offset 200 (e.g. web running on port 8280).