GeeCON Prague 2014*
The moose likes JBoss/WildFly and the fly likes jboss tmp files deletion on server restart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "jboss tmp files deletion on server restart" Watch "jboss tmp files deletion on server restart" New topic
Author

jboss tmp files deletion on server restart

Rajani Panchumarthy
Greenhorn

Joined: Jan 27, 2009
Posts: 22
Hi,

Could you tell me abt configurations to be done for deleting the tmp files from (jboss.server.temp.dir) in jboss upon server restart.

Thanks.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

Those are meant to be temp files and hence will be deleted on a restart. Why do you want them to be around after a restart?

[My Blog] [JavaRanch Journal]
Rajani Panchumarthy
Greenhorn

Joined: Jan 27, 2009
Posts: 22
I am using jboss4.2.3 and the files inside the tmp folder are not deleting upon server restart.
the persist even after restart. which configuration file in jboss is responsible for deleting these tmp files?
seems like i am missing any particular configurations related to this.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

Oops, i misunderstood your first post.

Rajani Panchumarthy wrote:I am using jboss4.2.3 and the files inside the tmp folder are not deleting upon server restart.
the persist even after restart.

Can you post the exact path to those files and even the name of the file(s) which stay back? By the way, is that causing any trouble? If yes, then please provide more details.
Rajani Panchumarthy
Greenhorn

Joined: Jan 27, 2009
Posts: 22
<jboss-server-path>/server/mydeployfolder/tmp is the path of the folder in which i am trying to store few temp files when my application runs.
When the server restarts, I do not want these files anymore.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

Can you post the relevant code from your application, which creates those files in the tmp folder?
David Coble
Greenhorn

Joined: Jul 27, 2008
Posts: 1
I'm having the same problem. If I ignore my tmp directory for a week, it becomes simply Brobdingnagian (only about 3 gigs, but tens of millions of files--call it a teacup from Brobdingnag) and can take 40 minutes for my wretched OS (win 7 pro) to delete.

(Yes, I have turned off search indexing on the tmp directory and Yes, I'm hitting shift-delete to bypass the recycle bin.)

I have the same project in a VirtualBox-hosted Ubuntu distro and my results are similar, but not as bad.

It would be nice if the tmp directory were automatically deleted when I start the server. That way, it wouldn't build up to unwieldy sizes. (It would also be nice if I could quickly delete a large directory--but that's another story.)

Is there some setting in jBoss Community plugin that determines whether the tmp directory is deleted when the server is started?
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

We use JBoss 4.3 in production also.

The tmp and work folders do need regular pruning. We have modified the startup scripts to flush them.


WP
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

David, which exact version of JBoss AS are you on? JBoss AS 5.x has some known issues around this which were only fixed in later versions.
 
GeeCON Prague 2014
 
subject: jboss tmp files deletion on server restart