I have a J2EE application that needs a special component. This component is not to be referenced by any other component or a client. All it does is wake up every few seconds, does some processing, and then gos to sleep. What would be the ideal way to implement this component: As a servlet? As a MDB? Or as something else?
Try Quartz. http://www.quartzscheduler.org.
I would suggest you write the component as a Thread, and start the thread in the init() method of a servlet. Then, in your web.xml configuration file, specify that your servlet will load on startup.