It is possible to run JBoss without it writing out to any files. Here is how to set this up. You can pick and choose from this list, but these instructions assume you want JBoss to write nothing:
Use the log4j.xml and log4j.properties files attached to this page. These log4j configuration files will send all log messages to the console, but not to any file.
Set -Dlog4j.configuration=file:/mypath/log4j.properties as a system property in the JBoss startup script. The log4j.properties file is the one attached to this page.
Set -Djboss.deploy.localcopy=no as a system property at in the JBoss startup script. This property will keep several jars and xml files from being copied. (This is for JBoss 3.x only)
Make sure that all deployments are completely "exploded". This will keep them from being exploded and copied at run time. This includes deployments that come with JBoss. Depending on the complexity of the deployment, this could be difficult, but you should be able to get it to work. Otherwise, files will be copied to the jboss_install/server/default/tmp directory.
Make sure that all JSP files are pre-compiled so that Tomcat won't need to write out any .class files. Otherwise, files will be written to the jboss_install/server/default/work directory.
Use of the hypersonic database is not recommended for production. However, if you do use it, you can run it in "in memory" mode to avoid disk access.
To completely take $JBOSS_HOME/server directory out of JBoss installation directory (for example if you want the latter to be read-only), set these two system properties: '-Djboss.server.base.dir=/path/to/your_new_server_directory' and '-Djboss.server.base.url=file://path/to/your_new_server_directory' when running server.
Comments