struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillermo Meyer" <gme...@interbanking.com.ar>
Subject RE: background process
Date Tue, 04 May 2004 10:50:34 GMT
We implement something like this. 
We have a really heavy process submitted by a user, so we don't want him
to wait for finishing.
In a struts action, we call a Service (POJO) and this service places a
message in a JMS and saves a record of the process in a database table
in a "running" state. Then the first action forwards to other action
that keeps checking (autorefresh) if the JMS process has finished,
cheking if the process database record changes the state.
The operation is performed when attended by JMS (the POJO service itself
is a JMS MessageListener) and when finish updates the database record
indicating its completion and stores the result in the table.
If the user waits for the process to finish, he sees an autorefreshing
page that when detects (the action) its completion forwards to the
results page. If the user leaves the application, he can return later
and query the process status and results form the table.

If you also need something that runs in the background without user
intervention, check javax.management.timer.Timer class from JMX

Regards.
Guillermo.

-----Original Message-----
From: Wei, Robert (MAN-Corporate) [mailto:Robert.Wei@cox.com] 
Sent: Lunes, 03 de Mayo de 2004 05:32 p.m.
To: 'Struts Users Mailing List'
Subject: background process


Hi Folks,

I need implement an action which sends back a forward upon request and
then, keep working on a batch process till finish in the background.
Anyone familiar with an easy mechanism in struts 1.1? Thanks.

Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas
en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii)
amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su
autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado,
uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad
ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este
mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo
inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar,
revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es
el destinatario. Muchas gracias.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message