Weblog

All | Personal | Sun
« Previous day (Feb 19, 2006) | Main | Next day (Feb 20, 2006) »
20060220 Monday February 20, 2006

How to implement cron in Enterprise application One my colleague asked me for implementing cron functionality in J2EE applicationthat is deployed in Sun application server. He needs to execute scheduled commandsin his EJB module. I suggested folowing solution that consists of Timer bean and lifecycle module that starts the timer when the server is started.
I know that better solution is used lifecycle module that is connected to EJB module only. For instance, where the module is deployed the lifecycle listener can invoke the bean. However, Sun Application server doesn't support this type lifecycle listener. The WebLogic server supports lifecycle listeneres on module application level, see here. Other solution is use servlet life cycle listener in web tier but this suggestion adds additional dependency for J2EE application. Since I didn't find better solution I used lifecycle module and Timer bean. Steps are below:

Posted by pblaha ( Feb 20 2006, 05:41:41 PM CET ) Permalink Comments [4]

Calendar

RSS Feeds

Search

Links

Navigation

Referers

Older blog entries