Reputation: 17940
I have a Jboss 7.1.1 installation and I want to deploy 2 EAR files on it, each one runs in a different instance with different standalone.xml configuration, what will be the best way to do it ?
What i thought of is to define 2 different deployment definitions for the 2 apps, which means to change this section:
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
</subsystem>
Is that the way to go or is there a better way?
Upvotes: 0
Views: 2703
Reputation: 857
You can specify a deployment scanner that uses a property, say "my.deploy.dir" and specify that when starting each instance of your standalone server.
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
<deployment-scanner name="myDeployDir" path="${my.deploy.dir}" />
</subsystem>
You will specify the value for the property during startup using a property file or with a -D.
bin/standalone.sh -P propFile_that_has_my.deploy.dir_value
bin/standalone.sh -Dmy.deploy.dir=myDeployDir1
You can also define another configuration file like your original post.
Upvotes: 0
Reputation: 17815
I would suggest you check out domain mode rather than standalone. If that is too complex or just overkill I suppose using the --server-config
argument would work. You would just have to make sure that each configurations is set to bind to a different address.
Server one:
[jperkins@jperkins-rh jboss-as-7.1.1.Final]$ bin/standalone.sh --server-config standalone.xml
Server two:
[jperkins@jperkins-rh jboss-as-7.1.1.Final]$ bin/standalone.sh --server-config standalone-full.xml
You could also use the -b xxx.xxx.xxx.xxx
and -Djboss.bind.address.management=xxx.xxx.xxx.xxx
options if you'd just like to test it.
Upvotes: 1