Hi. I'm a newbie in GWT and my JAVA skills aren't to good as well.

In order to learn these technologies I'm trying to implement an e-mail
client.

Time needed to get all messages (say:  200) from mail-server is quite
long (using pop3). My solution looks like that:

User puts access data in configuration box, afterthat client requests
server to download all messages to server-side database .

                     mailAsync.getMailsSubjectsToDB(accessData ,
toDBcallback);

At the same time client sends another request in order to get already
downloaded messages - client repeats this until all messages from mail-
server  are in database (it's being stoped by toDBcallback's
onSuccess() method).

  refreshTimer = new Timer(){
           @Override
        public void run(){
            AsyncCallback<ArrayList<EmailItem>> callbackNewMails = new
AsyncCallback<ArrayList<EmailItem>>(){

                        @Override
                        public void onFailure(Throwable caught) {
                        .....
                        }
                        @Override
                        public void onSuccess(ArrayList<EmailItem> result) {
                                EmailItems.addNewMails(result);
                                update(result.size());
                        }
            };

            mailAsync2.getMailsSubjects(callbackNewMails);
        }
      };  refreshTimer.scheduleRepeating(2500);


However in practice, these two methods don't run concurrently. First
mailAsync2.getMailsSubjects(callbackNewMails) call is oporeted just
after all messages are loaded into database.

So here's the question: Do I have to use threads in the server-side
code, or is there any other server that's got built-in threads
management?

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