Re[2]: Best Practice for long running tasks with status check

2004-01-29 Thread Martin Gross
hi marco,
 thanks for the information. I will check JMX.

Regards,
Martin

 Hi,
 My 2 cents..
 For the first half of your query, you can use JMX timer. Best way to do
 that
 Is to write an MBean that register itself with the timer and eventually
 receive notifications.
 You can make so that the 'object htat needs to be updated all the time'
 is
 A listener to notifications sent from the Timer. This 'object' should be
 inside your Mbean, and you can write a method on your MBean that returns
 the
 Current status.
 Ok, maybe I am giving u too much info,  but please check JMX and the
 Timer service to see if it suits you

 Regards
 marco

 -Original Message-
 From: Martin Gross [mailto:[EMAIL PROTECTED] 
 Sent: 29 January 2004 17:20
 To: Struts Users Mailing List
 Subject: Best Practice for long running tasks with status check

 Hi,

   I need to start an long running task by a struts action which will
   run for maybe half an hour. I dont want the action to run for half
   an hour. It should start the task and then respond that the task has
   been started. Also it should be possible to check the
   status of the task and see for example how many elements have already
   been processed.

   What would be the best practice to do this? Code examples would be
   also appreciated.
  

 Regards,
  Martin



 -
 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[2]: Best Practice for long running tasks with status check

2004-01-29 Thread Martin Gross
How would I get the results from the getter to the browser if I want
them regularily? With a meta-refresh in the html page? Or some kind of
keeping the connection or response open?

 Create a bean with a list of tasks to complete and have a thread execute
 them and then have a getter that will respond with the total tasks over
 tasks completed.

 -Original Message-
 From: Martin Gross [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 29, 2004 11:20 AM
 To: Struts Users Mailing List
 Subject: Best Practice for long running tasks with status check

 Hi,

   I need to start an long running task by a struts action which will
   run for maybe half an hour. I dont want the action to run for half
   an hour. It should start the task and then respond that the task has
   been started. Also it should be possible to check the
   status of the task and see for example how many elements have already
   been processed.

   What would be the best practice to do this? Code examples would be
   also appreciated.
  

 Regards,
  Martin



 -
 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: Re[2]: Best Practice for long running tasks with status check

2004-01-29 Thread Hookom, Jacob
The only way to force a client to update is to do a meta-refresh in the
html.  The other thing you can do is setup a callback handler, so you can
have Bean A, listen for events from you task thread, telling you when things
are completed.  You in turn, ask Bean A for information that it receives as
a call back handler for your task thread.

-Original Message-
From: Martin Gross [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 12:55 PM
To: Struts Users Mailing List
Subject: Re[2]: Best Practice for long running tasks with status check

How would I get the results from the getter to the browser if I want
them regularily? With a meta-refresh in the html page? Or some kind of
keeping the connection or response open?

 Create a bean with a list of tasks to complete and have a thread execute
 them and then have a getter that will respond with the total tasks over
 tasks completed.

 -Original Message-
 From: Martin Gross [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 29, 2004 11:20 AM
 To: Struts Users Mailing List
 Subject: Best Practice for long running tasks with status check

 Hi,

   I need to start an long running task by a struts action which will
   run for maybe half an hour. I dont want the action to run for half
   an hour. It should start the task and then respond that the task has
   been started. Also it should be possible to check the
   status of the task and see for example how many elements have already
   been processed.

   What would be the best practice to do this? Code examples would be
   also appreciated.
  

 Regards,
  Martin



 -
 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]



AW: Re[2]: Best Practice for long running tasks with status check

2004-01-29 Thread Kasterovic, Slobodan
-- The only way to force a client to update is to do a 
-- meta-refresh in the
-- html.

and what is whith asynch pushing of data from server to client ?

IMHO it is possible, but not simple, however interesting :).


Slobodan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]