I'm having trouble passing a context map in a call to createSession(). I'm using the chat room code from Connections #2. I modified it in two ways: first, I added the following to the Glacier2 config to turn on context forwarding:
I then create the context map and call createSession() as follows:Code:Glacier2.Client.ForwardContext=1 Glacier2.Server.ForwardContext=1
However, when I print out the contents of the context map received by checkPermissions() in the permissions verifier, it's always empty. What am I doing wrong?Code:final Map<String, String> contextMap = new HashMap<String, String>(); contextMap.put("foo", "bar"); chatSessionPrx = ChatSessionPrxHelper.uncheckedCast(router.createSession(id, pw, contextMap));
BTW, the context maps created in ChatRoom's enter() method are passed, so I know it works at least some of the time.
This post seems to be asking the same question, but there's no answer given:
Finally, speaking of context maps, are they ever mutated? That is, for the ChatRoom class, is it safe to create the map once and store it as a class member rather than creating a new one with every call to enter()?
Thanks!

Reply With Quote
