Hi Gert,
it will require some coding, but we did that multiple times already.
You'll need to register GrizzlyServerFilter [1] to existing Grizzly
instance. Currently, we are doing that via an AddOn [2], which is
registered here [3].
~15 months ago, we already did similar thing for JavaOne presentation,
see [4], project placeholder. It does what you need and much more (it
shares hk2 ServiceLocator from Jersey to Tyrus, thus making Tyrus "hk2"
enabled. You don't need that part..)
Hope it helps,
Pavel
[1]
https://github.com/tyrus-project/tyrus/blob/master/containers/grizzly-server/src/main/java/org/glassfish/tyrus/container/grizzly/server/GrizzlyServerFilter.java
[2]
https://github.com/tyrus-project/tyrus/blob/master/containers/grizzly-server/src/main/java/org/glassfish/tyrus/container/grizzly/server/WebSocketAddOn.java
[3]
https://github.com/tyrus-project/tyrus/blob/master/containers/grizzly-server/src/main/java/org/glassfish/tyrus/container/grizzly/server/GrizzlyServerContainer.java#L200
[4]
https://github.com/pavelbucek/placeholder
On 10/01/2017 17:40, Gert van Spijker wrote:
> I am contemplating to use Tyrus for Web Sockets support on our
> existing Java back-end.
> The back-end is a plain Java 8 application, but sets up a Grizzly
> server with Jersey Resources registered through a ResourceConfig
> instance.
>
> I am aware of the "tyrus-container-grizzly-server" module, but that
> would presumably import and set up a separate Grizzly server, possible
> even with a different version from the one we are already using.
>
> How do I go about to set up a Tyrus WebSocket Endpoint on a Grizzly
> instance shared with Jersey JAX-RS Resources?
>
> Thanks
>
> Gert van Spijker