Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Clean up temp files in Weblogic?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

Thanks for the help in advance. Is it possible to configure Weblogic 8.1.2 to clean up files in a temp directory within a deployed web application?

For example:
If i have a web application deployed at C:\bea\user_projects\domains\mydomain\applications\MyWebApp\

and have files which are written to

C:\bea\user_projects\domains\mydomain\applications\MyWebApp\temp

Is it possible to configure Weblogic to delete all files within the temp directory, at a designated time (perhaps every 48 hours)?

I'm assuming it isn't possible, and I will have to create a CleanUpServlet of sorts.

Thanks,
J.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you may consider to program a postStop listener

http://e-docs.bea.com/wls/docs90/programming/lifecycle.html
 
Jordan Borowski
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Hank,

Thanks for the response. I took a look at the ApplicationLifecycleListener events and I believe these events are only executed once per "lifecycle".

I'd essentially like the Web Application to check the /temp directory every 24 hrs and delete all files which are 4 hours or older.

It looks as if I will have to implement a servlet which implements a Timer Event and Listener.

Please advise me if there is another methodology within Weblogic.

Kind Regards,
J.
 
You have to be odd to be #1 - Seuss. An odd little ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic