* @param task A code block to execute
*/
public static void withSession(String sessionId, Runnable task)
{
TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(ServerContextFactory.get());
taskDispatcher.dispatchTask(new IdScriptSessionFilter(sessionId), task);
}
/**
* As {@link #withSession(String, Runnable)}, but for use when there is more
* than one copy of DWR in a ServletContext.