Hi All,

I'm trying to implement file upload support for msf4j with FormParam. In
the none streaming mode, we need to create temp files in some location and
clean them after a particular time period.

For that purpose at the moment I'm using apache commons-io provided
FileCleaningTracker[1, 2]. There we can give the set of file objects that
we need to track. This will be running in a separate thread. When those
objects are eligible for GC, it will delete the those files. In this way we
can be sure that the temp objects will not get clear before the actual
service consumes them.

IMHO it would be much easier if we can provide a similar support from the
kernel level, since products will require similar functionality in the
future.

AFAIU rather than tracking the file object references, if we run this as a
periodic task (like in c4) we have to assume that the temp files are been
consumed after a pre-configured time. Is it safe to assume so?

WDYT?

[1] -
https://commons.apache.org/proper/commons-io/javadocs/api-2.2/org/apache/commons/io/FileCleaningTracker.html
[2] -
https://github.com/apache/commons-io/blob/trunk/src/main/java/org/apache/commons/io/FileCleaningTracker.java

Thanks
-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog      alokayasoya.blogspot.com
About    http://about.me/thusithathilina
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to