Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've noticed since moving to jboss 5, tmp files for each instance are handled differently. In jboss 4, the entire directory was purged at each jboss restart. In 5, the applications are exploded to uuid-named folders, and are never cleaned up.

This is obviously an architectural change, but I can't seem to find any documentation on this. Is there a mechanism to automate the cleanup within jboss, or do I write a script to purge everything since the last jboss restart? What's the value in the new way of handling tmp files?



share|improve this question
Relates to… – Jon Onstott Oct 6 '11 at 18:34

The cleanup method in use seems to be to edit the bin/run.bat script so that the tmp folder is deleted before JBoss starts. I've got this at the top of run.bat:

rem ******** CLEAR TMP, WORK, LOG ***************
rmdir /s /q c:\apps\\server\default\tmp
rmdir /s /q c:\apps\\server\default\work
rmdir /s /q c:\apps\\server\default\log
mkdir       c:\apps\\server\default\tmp
mkdir       c:\apps\\server\default\work
mkdir       c:\apps\\server\default\log
echo --- Cleared temp folders ---
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.