Hello Joakim,
I am not 100% sure I understand your question but I hope this piece of
code answers your question?
class SocketCreator extends JettyWebSocketCreator
{
def createWebSocket(request : JettyServerUpgradeRequest,response :
JettyServerUpgradeResponse) =
Servlet.this.createWebSocket(request.getHttpServletRequest)
}
The Servlet.this.createWebSocket call does always return an instance of
a class that extends Session.Listener (in the 12.0.x case, in 11.x times
it was a somewhat different hierarchy).
Cheers,
Silvio
On 12-09-2023 17:38, Joakim Erdfelt wrote:
Does your `_socketCreator = new SocketCreator` return an Endpoint 100%
of the time?
Joakim Erdfelt / joa...@webtide.com
On Mon, Sep 11, 2023 at 7:15 AM Silvio Bierman
<sbier...@jambo-software.com> wrote:
Hello Joakim,
I found the piece of code that is responsible for the warning. Our
Servlet overrides init and service methods thusly:
override def init(cfg : jakarta.servlet.ServletConfig) =
{
_config = cfg
_socketContainer =
JettyWebSocketServerContainer.getContainer(_config.getServletContext)
_socketCreator = new SocketCreator
super.init(_config)
}
override def service(request : HttpServletRequest,response
: HttpServletResponse)
{
request.setAttribute("scripture.servlet",this)
if (_socketContainer == null)
super.service(request,response)
else if
(!_socketContainer.upgrade(_socketCreator,request,response))
super.service(request,response)
else if (!response.isCommitted)
super.service(request,response)
}
and the call to _socketContainer.upgrade causes the warning to be
printed. I do not yet know why this is but I will look into this.
Cheers,
Silvio
_______________________________________________
jetty-users mailing list
jetty-users@eclipse.org
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users