I am interested in the thread management when using request factory. I organize my server code in a way that a business service depends on a DAO layer that depends on an object datastore instance (object on which you can call datastore operations - I use Twig).
On the client side when I fire a request, the service locator creates a new instance of the service along with its dependencies in the same Thread. I tried to run the same request every 15 seconds. I noticed that the service is only created once, not per request. I also noticed that after a certain number of times, the Thread changed. This is an issue for me because Twig requires that the object datastore must be run in the same Thread as the one it was created. Is it the normal behaviour? if not what could be the reason? Log trace (the number is the thread id): 29: New service from service locator 29: New Dao 29: Using datastore com.google.code.twig.annotation.AnnotationObjectDatastore@7fba5980 29 New class MyServiceImpl 29: Call service method 29: Using datastore com.google.code.twig.annotation.AnnotationObjectDatastore@7fba5980 29: Call service method 29: Using datastore com.google.code.twig.annotation.AnnotationObjectDatastore@7fba5980 29: Call service method 29: Using datastore com.google.code.twig.annotation.AnnotationObjectDatastore@7fba5980 29: Call service method 29: Using datastore com.google.code.twig.annotation.AnnotationObjectDatastore@7fba5980 29: Call service method 29: Using datastore com.google.code.twig.annotation.AnnotationObjectDatastore@7fba5980 29: Call service method 29: Using datastore com.google.code.twig.annotation.AnnotationObjectDatastore@7fba5980 29: Call service method 29: Using datastore com.google.code.twig.annotation.AnnotationObjectDatastore@7fba5980 22: Call service method 22: Using datastore com.google.code.twig.annotation.AnnotationObjectDatastore@7fba5980 Datastore Thread: 29 - Current Thread: 22 -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/D35OPVzOP9MJ. 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.
