Hi hartdrooz,
Since your EntityManager was created in the first request, you wouldn't have a problem there because it was created and used in the same thread. For every subsequent request, most likely it will run a different thread and then the error you are getting.
If you are certain that there won't be more than 1 client connection at the same time, you could simply set
managerAuthorizeThreadId = null;
However, if there is more than one client request concurrently that uses the same EntityManager, you might face some unwanted behavior. In this case your best option is to set a new EntityManager for each request. (However, since your service is by session, you wouldn't run into this)
Regards,
Silvio.
Edited by sbelini - 21-Feb-2012 at 1:04pm