RE: background process
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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: background process
If it's unix that you are running on you could run a command using nohup , the java orthodox way is to use a message driven bean/jms if you are running inside an applicaion server such as JBoss. --B atta-ur rehman wrote: Hello Robert, As far as I know Struts doen't provide anything like this. And actually it should not! You'd use Thread class to implement such a task that needs to return immediately while running in the background. Hope this helps. ATTA - Original Message - From: Wei, Robert (MAN-Corporate) [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, May 03, 2004 1:32 PM 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: background process
Hello Robert, As far as I know Struts doen't provide anything like this. And actually it should not! You'd use Thread class to implement such a task that needs to return immediately while running in the background. Hope this helps. ATTA - Original Message - From: Wei, Robert (MAN-Corporate) [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, May 03, 2004 1:32 PM 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: background process
I haven't used it yet, but I suppose you could create a one-time (or repeating) job from within your Action into the Quartz scheduling engine (free): (http://www.opensymphony.com/quartz/features.html) Regards, David -Original Message- From: Bryan Hunt [mailto:[EMAIL PROTECTED] Sent: Monday, May 03, 2004 8:21 PM To: Struts Users Mailing List Subject: Re: background process If it's unix that you are running on you could run a command using nohup , the java orthodox way is to use a message driven bean/jms if you are running inside an applicaion server such as JBoss. --B atta-ur rehman wrote: Hello Robert, As far as I know Struts doen't provide anything like this. And actually it should not! You'd use Thread class to implement such a task that needs to return immediately while running in the background. Hope this helps. ATTA - Original Message - From: Wei, Robert (MAN-Corporate) [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, May 03, 2004 1:32 PM 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]