My experience with application servers is limited to some basic servlet coding, so I am not even sure how to frame this question appropriately.
I need to write a java program that runs on the (java) application server and continuously executes a certain method (it will check for files in a certain directory).
I have found a way to schedule the start of applications but need to know where to put the code that I would normally put in the main() method in a regular java program.