Is there a way to start up a Timer object?

19 Oct '13, 10:10 PM
2,368 Views
Forum Forum Starter - Level 2

Hi, I want to have a java class method fired off at specific time intervals. My ideal solution is that at start-up have some kind of timer object instantiated that can be configured to call either a static java class method, or instantiate an object to fire the method.

If anyone can suggest how to do this please?

 
x 0
Follow
Answer Answer at this question and get points!
Forum Starter - Level 2

A bit more detail ... and suggested solution if WebRatio doesn't all servlet level access.

I could just do all this myself on the first instantiation of my custom unit but a better solution would be to have it happen on servlet initialization ... this method would provide the user experience I want.

I have a class in my Custom unit that extends the java.util.Timer and I want it to be instantiated when the servlet starts up. The class performs some database cleanup type tasks.

To get the perfect answer, on servlet start-up is there a way to have the servlet invoker kick off the initializer?

 
x 0
Answer at this question and get points!