请教一下CometD怎么支持session?

在做CometD开发的时候发现整体的servlet已经封装了。应用基于BayeuxService开发。但是怎么来操作session呢?
请大家帮帮我。

第一步:
web.xml文件

cometd
org.cometd.server.continuation.ContinuationCometdServlet

requestAvailable
true

....

第二步:
在继承BayeuxService的类中
HttpServletRequest request = getBayeux().getCurrentRequest();
再 request.getSession()就可以了

注意:
只有第一步配置了requestAvailable 为true 第二步才能拿到request否则不行。