[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] Jetty 12.0.x blocks server-to-server requests (and in case of 12.0.1 issues warning: WARN :oeju.Blocker:qtp686466458-43: Blocking.Callback incomplete)
|
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?
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