Hello
Can anyone tell me if it is appropriate to use a ServletContextListener for a particular requirement?
What I have is a web application which runs a particular job every hour to poll a number of RSS feeds and at any time a user can define a new RSS feed for polling.
What I want to avoid is a user adding a feed(s) during a current hourly polling cycle and having this feed(s) included in that cycle.
So what I'm thinking about is using a ServletContextListener with a static boolean variable which records whether a polling cycle is running or not. If an hourly polling cycle is running, a new feed defined by a user will not be included in this cycle; if polling is not running, then the feed can be included in the next hourly run.
Can anyone advise? The only alternatives I see are to use a flag on a database table or to update a value in a properties file (if this can be done).
Thanks
Martin O'Shea.