• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best way to Listen for file changes

 
Alejandro Ross
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

My question is as follows:
What is the best way to code a listener for file changes on a web application? Should it be a singleton? Should I create a listener? I hear that a standard listener with timer can cause memory issues with some applications.. I am using Quartz to run jobs. I want to fire a Quartz job that uses a file right after it has been modified.

Thanks in advance,


Alex
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why should it be a singleton ? (ok i am from the "Singletons are evil side" :-) )

have a look at this project:
http://jpoller.sourceforge.net/


pascal
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you ever want to have more than one listener waiting for a file change? It's possible, right? So no, not a singleton.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic