You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2016/12/12 21:03:13 UTC

websocket and custom instantiator

Hi guys,

on 9M15 it seems the default server configurator just uses a newInstance
and not the instance manager. Any reason? Is it too hard to catch close and
destroy instances properly?

Issue is it makes hard to integrate with an IoC without needing some
boilerplate in onopen() and onclose().

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

Re: websocket and custom instantiator

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2016-12-13 11:18 GMT+01:00 Rémy Maucherat <re...@apache.org>:

> 2016-12-12 22:03 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
> > Hi guys,
> >
> > on 9M15 it seems the default server configurator just uses a newInstance
> > and not the instance manager. Any reason? Is it too hard to catch close
> and
> > destroy instances properly?
> >
> > Issue is it makes hard to integrate with an IoC without needing some
> > boilerplate in onopen() and onclose().
> >
>
> It gets registered a little bit later in WsSession.
>
>
Hmm, didn't see it, do you have the class/method?


> Ok for encoder/decoder, this is not done, but is it certain these objects
> are injectable ?
>
>
By spec not sure but would be nice to inject a reusable codec or serializer
which can optimize the data (@Inject Jsonb for instance). Shouldn't cost
much to tomcat since instance manager is there.


> Rémy
>
>
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://blog-rmannibucau.rhcloud.com> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <https://github.com/
> > rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> > <https://javaeefactory-rmannibucau.rhcloud.com>
> >
>

Re: websocket and custom instantiator

Posted by Rémy Maucherat <re...@apache.org>.
2016-12-12 22:03 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:

> Hi guys,
>
> on 9M15 it seems the default server configurator just uses a newInstance
> and not the instance manager. Any reason? Is it too hard to catch close and
> destroy instances properly?
>
> Issue is it makes hard to integrate with an IoC without needing some
> boilerplate in onopen() and onclose().
>

It gets registered a little bit later in WsSession.

Ok for encoder/decoder, this is not done, but is it certain these objects
are injectable ?

Rémy


>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/
> rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>

Re: websocket and custom instantiator

Posted by Romain Manni-Bucau <rm...@gmail.com>.
PS: same for encoders/decoders BTW


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-12-12 22:03 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:

> Hi guys,
>
> on 9M15 it seems the default server configurator just uses a newInstance
> and not the instance manager. Any reason? Is it too hard to catch close and
> destroy instances properly?
>
> Issue is it makes hard to integrate with an IoC without needing some
> boilerplate in onopen() and onclose().
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>