I think it's reasonable to have a single instance of a *ServiceAsync,
but I wouldn't put it into a singleton. As Miško Hevery puts it,
"Singletons are Pathological Liars". Check out this blog post for why:
http://googletesting.blogspot.com/2008/08/by-miko-hevery-so-you-join-new-project.html

You'd be better off injecting the *ServiceAsync into objects that need
it. However, as Essington pointed out, you might need to figure out a
way to lazy load these *ServiceAsync if you have a lot of them.

Regards,
Arthur Kalmenson

On Sep 30, 5:02 am, hezjing <[EMAIL PROTECTED]> wrote:
> Hi
> I have many service creation (like the following code) in my GWT
> application,
> XxxxServiceAsync xxxxService = GWT.create(XxxxrService.class);
>
> Is it safe to make all XxxxServiceAsync a singleton?
>
> Thank you!
>
> --
>
> Hez
--~--~---------~--~----~------------~-------~--~----~
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