How to configure location of vfs nestedjar
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.x
Issue
- I have to run two jboss application servers on a Linux container. I want to configure the location of the nestedjar-files for both jboss application server so that they are different are different. Instead of /var/tmp for both jboss server I want to have /var/tmp/jboss1 and /var/tmp/jboss2 for the nestedjar-files. How can I configue that?
- Regarding nestedjarNNNN.tmp files appearing in /tmp directory, is it possible to configure JBoss to make it to create them in a specific location?
- I have noticed a huge memory consumption in our Jboss instances which is related to a known Virtual File System (VFS) native memory leak . Having opted to use the JVM option -Djboss.vfs.forceVfsJar=true , JBoss is storing the “nestedjar*.tmp files in the /tmp server path. I would like to know if it is possible to change the path the files are stored?
Resolution
-
The location of nestedjar is determined by the system property
-Djava.io.tmpdirwhich is/tmpby default. -
If an instance is started with a custom value for
-Djava.io.tmpdir, then it should change the location of thenestedjar. -
To use the location of
jboss.server.temp.diras the destination of thenestedjar*files, set the following system property :
-Djboss.server.temp.dir.overrideJavaTmpDir=true
Root Cause
- The location of the
nestedjar*.tmpfiles defaults tojava.io.tmpdir
SBR
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.