Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bz64644 idle session handler #329

Closed

Conversation

sakshamverma
Copy link

markt-asf and others added 30 commits April 15, 2020 15:37
I was experimenting with Eclipse "potential resource leak" warnings and
found these. There are lots more but quite a few look to be false
positives.
These annotations create IDE warnings rather than suppress them.
When a component issues a SC_NOT_FOUND don't respond with the path/URI only in
the error message because it does not offer any more detail about the error,
plus the client knows the path/URI already.
The goal of this enhancement is to improve the regular expression used
for searching class loader repositories when bootstrapping Catalina.

With the Java regular expression engine which is regex-directed, we
gain in performance by using the negated character class [^\"]* rather
than the lazy quantifier .*? in the regular expression used for
searching class loader repositories when bootstrapping Catalina.
This allows collections like ArrayList and HashSet to initialize their backing arrays
with the correct size.
There are two styles to convert a collection to an array:
either using a pre-sized array (like c.toArray(new String[c.size()]))
or using an empty array (like c.toArray(new String[0]).

In older Java versions using pre-sized array was recommended,
as the reflection call which is necessary to create an array of proper size was quite slow.
However since late updates of OpenJDK 6 this call was intrinsified,
making the performance of the empty array version the same and sometimes even better,
compared to the pre-sized version.

See also: https://shipilev.net/blog/2016/arrays-wisdom-ancients/
Do not disable keep-alive where the response has a non-2xx status code
but the request body has been fully read. Patch by rjung.
markt-asf and others added 26 commits July 9, 2020 11:51
The NamingResources now hold and manage these.
Signed-off-by: Raymond Augé <rotty3000@apache.org>
Do not use StringBuilder when String concatenation is just fine.

Append char instead of String when possible.

Fix the toString of ExampleFilter

(cherry picked from commit 768524f)
This gives the rewrite valve an opportunity to rewrite the request.
Allow future configuration if needed.
A quick test with the web.xml files from Tomcat looks rather decent. I
don't know yet if it will be used by at least the functionality is more
complete this way.
Another item that can be added is generating a static loader as at the
moment each individual generated class is dynamically loaded, even
though the full list is known.
Export additional packages,
This avoids dynamic classloading, and calling the classaloder for not
found xml.
Signed-off-by: Raymond Augé <rotty3000@apache.org>
(Most commonly used codepath)

Avoid having to load APR classes in the Connector

Ensure that IntrospectionUtils can call setProperty on
PersistentProviderRegistrations
It is only used at compile time and should be present from Java 1.4
onwards so removal is expected to be safe.
- For usage with optimized for size Java and GraalVM native compilation images
- Maven groupId is set to org.apache.tomcat.experimental to classify it during evaluation of viability
- Does not ship as part of the standard Apache Tomcat library and sources
@michael-o
Copy link
Member

Rebase first

@sakshamverma sakshamverma deleted the BZ64644-IdleSessionHandler branch August 4, 2020 16:57
@sakshamverma sakshamverma restored the BZ64644-IdleSessionHandler branch August 4, 2020 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet