See quickstart ejb-multi-server, there are batch files (i.e. install-domain.cli) to modify a fresh installation.
Maybe that gives you an idea