When the submit button is clicked, it calls this method:

        private void startCheckJobTimer() {
                checkJobTimer = new Timer() {
                        @Override
                        public void run() {
                                checkJob();
                        }
                };
                checkJobTimer.schedule(TIMER_INTERVAL);
                checkJobRetries = 0;
        }


        private void checkJob() {

                AsyncCallback<Job> callback = new AsyncCallback<Job>() {

                        public void onFailure(Throwable caught) {
                               // logs a local error message

                                // many lines of code that try in vain to get
                                // useful information out of the empty Throwable

                               // Keep going so we don't loose the
whole job
                                checkJobTimer.schedule(TIMER_INTERVAL);
                        }

                        public void onSuccess(Job job) {
                                if (job.hasFinished()) {
                                        //  blah, blah, blah...
                                        return;
                                }

                                updateProgress(job);
                                checkJobTimer.schedule(TIMER_INTERVAL);
                        }
                };

                checkJobSvc.checkJob(currJobId, callback);
        }


Thanks!
John


On Jul 26, 10:09 am, "brett.wooldridge" <[email protected]>
wrote:
> Pls post some pseudo-code of your timer and RPC call.
>
> -Brett
>
> On Jul 26, 10:39 pm, kingdomain <[email protected]> wrote:
>
> > I have an app that involves long run times on a server (scientific
> > app).  I ported to GWT specifically to give better user feedback on
> > long jobs (e.g. progress bar, email results option, etc.).
>
> > I have to control threads on the server side, in my RPC services, in
> > order to avoid memory issues in tomcat due to the size of the jobs
> > this app runs on the server.  When a big job is running, subsequent
> > jobs can be submitted, and a GWT Timer polls the server periodically
> > to check on status and let the user know.  When a big job is running,
> > subsequent jobs start to generate errors after a while, and the
> > Throwable that comes back to the onFailure() is either NULL or it's
> > message and stack trace is also NULL.
>
> > Eventually I'll get a strange script stack over flow.  The code is
> > very simple: I start a timer when a job is submitted, and schedule it
> > to run in a few seconds.  The Timer calls a checkJob() method that
> > calls an RPC service and reschedules the timer to run again if the job
> > is not finished.  On the server side, all the service is going is
> > returning a simple object that encapsulates the job and it's progress.
>
> > Here is a log I keep on the client side:
>
> >    :
> >    :
> > 22:04:06 - Checking on Job: 1248572927276
> > 22:04:10 - Checking on Job: 1248572927276
> > 22:04:13 - Checking on Job: 1248572927276
> > 22:04:16 - Checking on Job: 1248572927276
> > 22:04:16 - Check Status failed.  The error returned was not NULL.
> > 22:04:16 - The error message was NULL or empty
> > 22:04:16 - The stack trace elements were NULL, looking in nested
> > error...
> > 22:04:19 - Checking on Job: 1248572927276
> > 22:04:19 - Check Status failed.  The error returned was not NULL.
> > 22:04:19 - The error message was NULL or empty
> > 22:04:19 - The stack trace elements were NULL, looking in nested
> > error...
> >    :
> >    :
> > 22:07:53 - Check Status failed.  The error returned was not NULL.
> > 22:07:54 - The error message was: (InternalError): script stack space
> > quota is exhausted
> >  fileName:http://binf.gmu.edu:8080/CoreGenes3.1/coregenes31/B08D8AE2434D86ADCBA...
> >  lineNumber: 669
> >  stack: isb()@:0
> > eval(
> > 22:07:57 - Checking on Job: 1248572927276
> > 22:08:43 - Check Status failed.  The error returned was not NULL.
> > 22:08:43 - The error message was: (InternalError): script stack space
> > quota is exhausted
> >  fileName:http://binf.gmu.edu:8080/CoreGenes3.1/coregenes31/B08D8AE2434D86ADCBA...
> >  lineNumber: 669
> >  stack: isb()@:0
> > eval(
>
> > (etc, etc.)
>
> > Please help.  Really stuck on this.
>
> > Thanks,
> > John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to