OSGi、Jetty 和 CometD/Bayeux
我让 Jetty 和 Bayeux 合作得很好,让我可以在 dojo 中使用 comet。然而,我现在需要迁移到 OSGi jetty 环境,并且正在努力让它工作。
在非 OSGi 环境中,以下行可以工作并让我启动服务等。但是,在 OSGi 中,servlet 上下文/配置中没有属性“BayeuxServer.ATTRIBUTE”。
BayeuxServer bayeux = (BayeuxServer)getServletContext().getAttribute(BayeuxServer.ATTRIBUTE);
有人有任何示例代码、博客文章、参考文章等来帮助解决这个问题吗?谷歌搜索没有任何结果!
谢谢, 埃德
I have got Jetty and Bayeux working well together to allow me to use comet with dojo. However, I now need to move to an OSGi jetty environment and am struggling to get it working.
In the non-OSGi environment, the following line works and lets me start services etc. However, in OSGi, there is no attribute "BayeuxServer.ATTRIBUTE" in the servlet context/config.
BayeuxServer bayeux = (BayeuxServer)getServletContext().getAttribute(BayeuxServer.ATTRIBUTE);
Does anyone have any sample code, blog posts, reference articles etc to help with this? Googling hasn't resulted in anything!
Thanks,
Ed
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经在这里写下了如何做到这一点 - http://www.jellard.co.uk/2011/12/osgi-jetty-cometd-bayeux-and-dojo/
I've written up how to do it here - http://www.jellard.co.uk/2011/12/osgi-jetty-cometd-bayeux-and-dojo/