That sounds reasonable to me. On Wed, Nov 4, 2009 at 6:50 PM, Roy Smith <[email protected]>wrote:
> Hi Max > > Thx for the answer, especially the correction on the transaction > implementation. > > The solution I'd arrived at is to use Guice to instantiate my DsS with a > scope of @RequestScoped. Do you see any problems with that approach? > > best > Roy > > > On Wed, Nov 4, 2009 at 7:02 PM, Max Ross (Google) < > [email protected] <maxr%[email protected]>> wrote: > >> A DatastoreService instance is extremely lightweight so feel free to >> create them as-needed. In addition, transactions are not tied to a specific >> DatastoreService instance but rather to the thread that started the >> transaction. Finally, assume that all classes in the api are _not_ >> threadsafe unless explicitly documented otherwise. >> >> Hope this helps, >> Max >> >> >> On Wed, Nov 4, 2009 at 4:35 AM, Roy <[email protected]>wrote: >> >>> >>> Should I be creating a DatastoreService for each "session", or are >>> they inexpensive enough that I can have one for each Kind? I realise >>> that for transactions, the latter doesn't work. >>> >>> A related question is how threadsafe is an instance of >>> DatastoreService? >>> >>> >>> >>> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" 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-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---
