Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

J2EE book question: Design pattern  RSS feed

 
Razvan Popovici
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

A lot of times I had to provide a (J2EE) solution for the following problem:

The client makes a request that is supposed to take a long time to be solved (3 min to 10 hours). While running this query, the client should be able to query the status of the task, and to be able to terminate it.

It is ok for the client to aquire the status by pooling, since there is no mechanism of call-back in EJB, like CORBA or DCOM have.

Until now, I found no standard way to do it: cannot use a session bean, since the request will time out and the client won't be able to aquire the status; if using message driven beans, I will also need to save the status in a entity and query it from the client using a session bean, which is the current solution; still, if working in a cluster, the node executing the task cannot be shut down until the task completes.

Is there any out of the box solution in the J2EE servers, particularly GlassFish for this pattern?

Razvan
 
David Heffelfinger
author
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Razvan,

I am not aware of any "out of the box" solutions for the problem you are describing.

David
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!