-
1. Re: JournalStorageManager getContext & newContext
clebert.suconic Mar 10, 2010 9:35 AM (in response to timfox)newContext doesn't associate the context with any thread. It's just used for CreateSession.
We will later use setContext on every invocation involving the same Server Session.
-
2. Re: JournalStorageManager getContext & newContext
timfox Mar 10, 2010 9:47 AM (in response to clebert.suconic)I still don't get it.
Why do we need newContext, if getContext also creates a new one?
-
3. Re: JournalStorageManager getContext & newContext
clebert.suconic Mar 10, 2010 9:52 AM (in response to timfox)handleCreateSession should set an OperationContext on the ServerSessionPacketHandler not on the CurrentThread.
And when creating a new Session, I want to have a brand new Context. (I don't want any previous operations on it).
Besides... The thread context will be (should be) empty most of the time... so a getContext() will perform unecessary operations through the ThreadLocal.
ServerSessionPacketHandler will later set the context on every call involving the Session.
This was done to serialize invocations on the same session and avoid those out of orders errors.