JBoss configuration
From Oxxus Wiki
With VPS hosting accounts from Oxxus.net, JBoss and all configuration files are placed in /var/jbossX where X is the version number.
JBoss comes with some predefined configurations: all, default, minimal. They are all found at JBOSS_HOME/server folder.
- Minimal
- Starts only the core JBoss server container without enterprise services
- Default
- This is the default and most common configuration for application developers
- All
- This configuration is used for clustering and includes all enterprise services
By default, script from init.d/ assigned for Jboss services start, stop and restart is set so All configuration is applied to Jboss upon start. If you need just Minimal without enterprise or Default, then run.sh script is needed for start-up. Script can be found in Jboss bin folder.
For example, to start Jboss with minimal services included, use command from VPS shell prompt : sh run.sh -c minimal &
The directive & is required for having Jboss start as background process.
Before starting Jboss server, correct memory amounts has to be set in Jboss's start-up configuration file, named run.conf, placed at the same folder where run.sh is. There are several directives regarding this matter that have to be configured for Jboss to run correctly along all web applications deployed later.
- -Xms
- Stands for minimum heap size. It should be kept small, just enough for Jboss initial start-up
- Default value: 16m
- -Xmx
- Option specifies the maximum heap size. It should be large enough to have all applications requirements met.
- -XX:MaxPermSize
- This is the amount of memory that is permanently assigned to JBoss for stuff that doesn't change often such as Java classes, etc
- Default value: 64m
Notes
Please note the amount of memory available to your VPS, as the total amount of memory used by JBoss will be MaxPermSize + Xmx.
There are also several other memory related start-up settings but above are most used ones.