Correctly shutting down a websocket handler
by Robin Anil
When a client disconnects, I see that onClose is not being fired. The only
way this seems to be firing if client sents a close frame.
Is there any way to detect disconnection and immediately close all the
opened resources.
Robin
Robin Anil | Software Engineer
1 year, 2 months
UNDERTOW-1573
by Alec Henninger
Hi all,
I wrote a bug report for UNDERTOW-1573:
https://issues.jboss.org/browse/UNDERTOW-1573
I'm happy to contribute a fix, however I'm not an expert in Undertow so
wanted to run by the dev list first.
A few things come to mind:
- Why are request attributes cleared at all? Can we keep them and let them
be GC'd later?
- If they do need to be cleared, could the clearing itself be done via an
exchange completion listener (assuming we can add it late and be sure it
will run after the access log completion listener)?
Thanks!
Alec
--
ALEC HENNINGER
HE/HIM/HIS
SR. SOFTWARE APPLICATIONS ENGINEER
Raleigh, NC
mobile: 570-856-2428
irc: alec
<https://red.ht/sig>
5 years, 3 months
When to use RequireWelcomeFileMapping
by Brad Wood
I have some questions about when I should be using the following:
servletInfo.setRequireWelcomeFileMapping(true)
I can't find any documentation or comments in the code that help me answer
exactly what that setting does and when to use it. I'm parsing a web.xml
file and creating the proper deployment from it, but I'm unsure when to set
the option above since there is no corresponding attribute or tag in a
web.xml along those lines.
I did find this comment in a code sample online
//if the JSP servlet is mapped to a path that ends in /*
//we want to perform welcome file matches if the directory is requested
*(
https://jar-download.com/artifacts/io.undertow/undertow-jsp/1.0.0.Beta27/...
<https://jar-download.com/artifacts/io.undertow/undertow-jsp/1.0.0.Beta27/...>
)*
but my app server has more than one servlet mapping with URL filters ending
with /* and the welcome file list should only apply to one of them so it
doesn't seem correct that ALL url filters ending in /* should set that. I'm
unclear on whether the welcome files are attempted up front or only if a
matching url filter isn't found.
Thanks!
~Brad
*Developer Advocate*
*Ortus Solutions, Corp *
E-mail: brad(a)coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
5 years, 3 months
Get HttpServerConnection create time
by Huibing Yin
Hi,
I have a servlet application that would like to know when the underlying HTTP connectionhas been established.
In the jetty, I could use the following code:
HttpConnection connection = (HttpConnection) request.getAttribute(HttpConnection.class.getName());
long connectedAt = connection.getCreatedTimeStamp();
How to do it in the undertow? Any help/suggestions are appreciated.
Thanks
5 years, 4 months