In addition to what Tim said, you can also look at Quartz.
You can use a framework to ease your job. One I have used in a project for a government agency here in Brazil is DWR. It is essentially a Reverse Ajax framework (which you should use instead of polling, if possible). It can also work in polling mode. Please take a look here for more details.