2

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

EdJ
  • 1,296
  • 1
  • 11
  • 16
  • I've got it working after hitting my head on a brick wall for hours and hours! Writing a blog post about it, will link here when it's done. – EdJ Dec 15 '11 at 14:45

1 Answers1

1

I've written up how to do it here - http://www.jellard.co.uk/2011/12/osgi-jetty-cometd-bayeux-and-dojo/

EdJ
  • 1,296
  • 1
  • 11
  • 16
  • Hi @Ed Jellard your link does not work anymore. Some comments within the answer would have been nice. – Mashrur Jun 21 '21 at 05:59