Why not firing request for new GUID group right after you receive asynch reply. Thereby you would always have fresh group of GUIDs available (given you request big enough group).
On 23 lis, 13:26, Slava Lovkiy <[email protected]> wrote: > Current solution i have is to generate a batch of guids on the server, > send it to the client once, at the initialisation of the app. Client > will use the guids from the batch, gradually exhausting the pool. The > refill of the pool is done when it is about to run out of available > guids using asynch call to the server. > > This solution has one flaw: due to the fact of asynchronous nature of > guids pool refill, client may run out of guids completely, throwing an > error something like 'outOfIndex'. So, it would be much easier to have > guid generated available to the client to avoid the issue above. > > On Nov 23, 8:40 am, Jim Douglas <[email protected]> wrote: > > > > > > > > > For the general question of "Is [x] implemented in GWT", bookmark: > > >http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html > > > For possible GWT-friendly UUID implementations, see: > > >http://www.google.com/search?q=gwt+uuid > > > FWIW, when I need a UUID in my GWT application, I find it easiest to > > generate it on the server, then send it to the client. > > > On Nov 22, 1:28 pm, Slava Lovkiy <[email protected]> wrote: > > > > Hi, > > > > Is there a way to be able to use the same java.util.UUID.randomUUID() > > > generator on server and client side? > > > > This might be particular useful, when some ids needs to be generated > > > on the client and then persisted on the server. > > > > Is there a better solution to solve the more general problem - some > > > entities may originate on the client and a complex graph can be > > > created with relatationships bases on ids. The ids must be globally > > > unique after persisting data on server. -- 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.
