felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Driessen <thomas.dries...@ds-lab.org>
Subject Re: WebSockets in Felix using Tyrus.
Date Wed, 28 Oct 2015 14:32:21 GMT
Hi Maurice,

if you're not forced to use tyrus you could use the jetty implementation
for websockets, which is already comes with felix.http bundle.

Kind regards,

2015-10-28 15:26 GMT+01:00 <info@cuhka.com>:

> Oh well, getting Tyrus standalone-non-OSGi running was easy, but how on
> earth to get it running inside a OSGi environment is beyond my knowledge.
> Citeren info@cuhka.com:
> I would like to use Tyrus[1] as my WebSocket implementation. In a non-OSGi
>> standalone setup I got it up and running fairly quick. However, I don't
>> know how to get it running with the felix http service in OSGi.
>> With the standalone setup one creates a specific 'container' for the
>> websocket endpoints, but in OSGi with http service one should somehow
>> register them with the http service.
>> The Tyrus user guide[2] has the following about deploying to a servlet
>> container:
>> "Endpoints may be deployed using javax.websocket.server.ServerContainer
>> during the application initialization phase. For websocket enabled web
>> containers, developers may obtain a reference to the ServerContainer
>> instance by retrieving it as an attribute named
>> javax.websocket.server.ServerContainer on the ServletContext, see the
>> following example for annotated endpoint"
>> Of course, I don't know if the http service provided by felix is a
>> websocket enabled container, but when I try to access the servlet context
>> in the init method of a servlet I deploy to the http service I get an
>> exception that the context hasn't been initialized.
>> The Tyrus packages are OSGi bundles, and if I understand it correctly,
>> have been used in the Glashfish server. However, I don't know how to
>> proceed.
>> I'm following the other thread about websockets, but I'm not getting the
>> gist of the thread.
>> Regards,
>> Maurice.
>> [1] https://tyrus.java.net/
>> [2] https://tyrus.java.net/documentation/1.0/user-guide.html#d0e34
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org

M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message