File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes bundling filewatcher in web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "bundling filewatcher in web application" Watch "bundling filewatcher in web application" New topic

bundling filewatcher in web application

Mohit Sinha
Ranch Hand

Joined: Nov 29, 2004
Posts: 125
All - I have implemented a simple file watcher listening to a particular shared directory for reading new files. This code is actually part of large code base which is shipped as a web application so don't have the option to run it as standalone program. I wanted to check how best can i put the file watcher in action to run it every time the web app is up.
Is servlet listener the right option or message driven bean?

Let know your thoughts.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63857

If you want to do something when the web app starts, a context listener is what you seek.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: bundling filewatcher in web application
It's not a secret anymore!