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 i...@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-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org