Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

Thanks.

-Dom

share|improve this question
    
Relates to stackoverflow.com/questions/3112271/… –  Jon Oct 6 '11 at 18:34
add comment

1 Answer

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\jboss-5.1.0.ga\server\default\tmp
rmdir /s /q c:\apps\jboss-5.1.0.ga\server\default\work
rmdir /s /q c:\apps\jboss-5.1.0.ga\server\default\log
mkdir       c:\apps\jboss-5.1.0.ga\server\default\tmp
mkdir       c:\apps\jboss-5.1.0.ga\server\default\work
mkdir       c:\apps\jboss-5.1.0.ga\server\default\log
echo --- Cleared temp folders ---
share|improve this answer
add comment

Your Answer

 
discard

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