OSGi、Jetty 和 CometD/Bayeux

发布于 2024-12-21 08:19:59 字数 368 浏览 5 评论 0原文

我让 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文