I have created two instances of jboss by copying the standalone folder.
I am writing installation scripts through an ant script. In that script, I am taking heapsize and other JAVA_OPTS as input.
During deployment, I copy the war file, I set up the JAVA_OPTS which are taken as an input and run standalone.sh. These are applicable only for that session and only for that run of jboss.
Next time, I do not want to copy the war file , I just want to start and stop the jboss using standalone.sh. But if I just use standalone.sh command it will take the default java_opts. Is there any way by which we can save the JAVA_OPTS values, which were collected as a part of installation, in some file and use them in the next start up? OR I have to make a copy of standalone.sh and standalone.conf and change the JAVA_OPTS there? I strongly feel that there has to be some different way to achieve this.
These values will be changed when I install the application next time and provide some different set of values. But during just restart, I want to use the same JAVA_OPTS as provided during installation.
Can someone suggest a good alternative?
You should be able to set the JAVA_OPTS in the environment before starting the server.
eg the sequence
./standalone.sh -c standalone-full.xml
logs: JAVA_OPTS already set in environment; overriding default settings with values: -Xmx1024m