Thursday, June 22, 2006

 

Generally Java: Concurrent Programming with J2SE 5.0 (Quartz in servers)

In a recent post, Generally Java: Concurrent Programming with J2SE 5.0, I noted the general ban on concurrent programming in Java web and application servers.

Fortunately, O'Reilly published an article back in March of this year about the Quartz scheduler.

Their article, Scheduling Jobs in a Java Web Application shows how to set up the Quartz scheduler as a Struts plugin.

This allows the scheduler to be initialized when the web application starts.

The article says it works with Tomcat and should work with other Java web containers as well.

Using the Quartz scheduler might alleviate the temptation to throw thread-related concurrent programming into a webapp or EJB.

If a scheduler is not what is needed, other techniques will have to be used to address concurrency needs of servlets or EJBs. If it is though, that is one less headache for developers to have to worry about themselves.

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?