[appengine-java] DatastoreService instances

2010-04-01 Thread keyurva
In my application, I create a DatastoreService instance, maintain a reference to it and use it for the life of that instance of the application. In another discussion I learned that the cost of creating a new DatastoreService instance is negligible. Given that, is it still advisable for me to mai

Re: [appengine-java] DatastoreService instances

2010-04-01 Thread John Patterson
As Ikai pointed out a DatastoreService is really very light weight so it really makes very little difference. If you are changing the config properties from place to place your only options are to cache each service by config or create a new one each time. If I were writing code by hand I

Re: [appengine-java] DatastoreService instances

2010-04-01 Thread Jeff Schnitzer
Appengine devs have said on a number of occasions that we should not assume thread-safety of any class not documented as being thread-safe. I don't see anything in the javadocs indicating that DatastoreService is thread-safe, therefore keeping an appwide instance of DS is probably risky - even if