Apache Tomcat 10 and Jakarta EE 9 - an update
Hi all, There has been a fair amount of progress made both towards a Tomcat 10 release and Jakarta EE 9 since my State of the Cat talk at ApacheCon EU in October. For those of you that haven't seen it is is on YouTube: https://www.youtube.com/watch?v=hfgO6R9o5Tw In order to update the Tomcat community there will be a webinar next week on Thursday 30th at 14.00 UTC. Joining details are below. The meeting will be recorded and uploaded to YouTube afterwards. Links will be posted once that is done. Topics planned to be covered include: - The Tomcat 10 release plan - Scope for Jakarta EE 9 - Schedule for Jakarta EE 9 - Progress towards Tomcat 10 - Progress towards Jakarta EE 9 (APIs, spec docs, TCKs) Hope to see you there. Mark = Webinar Joining Details = Topic: Apache Tomcat 10 and Jakarta EE 9 Time: Jan 30, 2020 14:00 London Join Zoom Meeting https://pivotal.zoom.us/j/124753263 Meeting ID: 124 753 263 One tap mobile +16699006833,,124753263# US (San Jose) +16468769923,,124753263# US (New York) Dial by your location +1 669 900 6833 US (San Jose) +1 646 876 9923 US (New York) 877 853 5257 US Toll-free 855 880 1246 US Toll-free Meeting ID: 124 753 263 Find your local number: https://pivotal.zoom.us/u/ajUQ3fLCY Join by SIP 124753...@zoomcrc.com Join by H.323 162.255.37.11 (US West) 162.255.36.11 (US East) 221.122.88.195 (China) 115.114.131.7 (India Mumbai) 115.114.115.7 (India Hyderabad) 213.19.144.110 (EMEA) 103.122.166.55 (Australia) 209.9.211.110 (Hong Kong) 64.211.144.160 (Brazil) 69.174.57.160 (Canada) 207.226.132.110 (Japan) Meeting ID: 124 753 263 Join by Skype for Business https://pivotal.zoom.us/skype/124753263 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55477] Add a solution to map a realm name to a security role
https://bz.apache.org/bugzilla/show_bug.cgi?id=55477 --- Comment #20 from Christopher Schultz --- (In reply to Michael Osipov from comment #19) > (In reply to Christopher Schultz from comment #18) > > How applicable is in web.xml, here? > > As far as I know, this is per-servlet which can be very tedious and cannot > be externalized. *facepalm* I didn't realize that was per-servlet. Yes, definitely not a great solution. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082 --- Comment #7 from Christopher Schultz --- (In reply to william.crowell from comment #4) > Setting org.apache.catalina.connector.RECYCLE_FACADES to true did work. Excellent. Since it "works", are you also able to reliably reproduce the error without RECYCLE_FACADES enabled? > Do you know why that fixed the issue? It prevented the sharing of response objects between requests. Tomcat (usually) properly protects these objects from shared-use, but applications have minds of their own. > I am also concerned about the performance impact of setting that flag to true. What kind of request-load are you expecting? The request objects are fairly lightweight and, since they should be short-lived, shouldn't put too much strain on the garbage collector (whose runtime is related to the number of live objects, not dead ones). My guess is that correctness is more important than performance. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch 9.0.x updated: Add new connector attribute to control facade recycling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Rémy, On 1/23/20 4:28 AM, r...@apache.org wrote: > This is an automated email from the ASF dual-hosted git > repository. > > remm pushed a commit to branch 9.0.x in repository > https://gitbox.apache.org/repos/asf/tomcat.git > > > The following commit(s) were added to refs/heads/9.0.x by this > push: new d5dce75 Add new connector attribute to control facade > recycling d5dce75 is described below > > commit d5dce75b5c55194065f585c9a0b9cf606eb3a165 Author: remm > AuthorDate: Wed Jan 22 15:35:37 2020 +0100 > > Add new connector attribute to control facade recycling > > Use the same default as before, using the system property and false > if not set. Did you intend to change the public interface of this class? RECYCLE_FACADES -> (gone) IMO it's too late in 9.0.x / 8.5.x / 7.0.x to remove this. Tomcat 10 is fine, but this constant should remain in the other versions. - -chris > --- java/org/apache/catalina/connector/Connector.java | 38 > ++- > java/org/apache/catalina/connector/Request.java | 14 +++-- > java/org/apache/catalina/connector/Response.java | 3 +- > webapps/docs/changelog.xml| 4 +++ > webapps/docs/config/http.xml | 11 +++ > webapps/docs/security-howto.xml | 10 +++--- 6 > files changed, 64 insertions(+), 16 deletions(-) > > diff --git a/java/org/apache/catalina/connector/Connector.java > b/java/org/apache/catalina/connector/Connector.java index > 515d2af..d54927c 100644 --- > a/java/org/apache/catalina/connector/Connector.java +++ > b/java/org/apache/catalina/connector/Connector.java @@ -25,6 +25,7 > @@ import java.util.HashSet; > > import javax.management.ObjectName; > > +import org.apache.catalina.Globals; import > org.apache.catalina.LifecycleException; import > org.apache.catalina.LifecycleState; import > org.apache.catalina.Service; @@ -56,13 +57,6 @@ public class > Connector extends LifecycleMBeanBase { private static final Log > log = LogFactory.getLog(Connector.class); > > > -/** - * Alternate flag to enable recycling of facades. - > */ -public static final boolean RECYCLE_FACADES = - > Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector .RECYCLE_FACADES", > "false")); - - public static final String INTERNAL_EXECUTOR_NAME = > "Internal"; > > > @@ -165,6 +159,17 @@ public class Connector extends > LifecycleMBeanBase { > > > /** + * The flag that controls recycling of the facades of the > request + * processing objects. If set to true the > object facades + * will be discarded when the request is > recycled. If the security + * manager is enabled, this setting > is ignored and object facades are + * always discarded. + > */ +protected boolean discardFacades = + > Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector .RECYCLE_FACADES", > "false")); + + +/** * The redirect port for non-SSL to SSL > redirects. */ protected int redirectPort = 443; @@ -373,6 +378,25 > @@ public class Connector extends LifecycleMBeanBase { > > > /** + * @return true if the object facades are > discarded, either + * when the discardFacades value is > true or when the + * security manager is > enabled. + */ +public boolean getDiscardFacades() { + > return discardFacades || Globals.IS_SECURITY_ENABLED; +} + + + > /** + * Set the recycling strategy for the object facades. + > * @param discardFacades the new value of the flag + */ + > public void setDiscardFacades(boolean discardFacades) { + > this.discardFacades = discardFacades; +} + + +/** * @return > the "enable DNS lookups" flag. */ public boolean getEnableLookups() > { diff --git a/java/org/apache/catalina/connector/Request.java > b/java/org/apache/catalina/connector/Request.java index > 841049a..7f27bdd 100644 --- > a/java/org/apache/catalina/connector/Request.java +++ > b/java/org/apache/catalina/connector/Request.java @@ -495,7 +495,7 > @@ public class Request implements HttpServletRequest { > recycleSessionInfo(); recycleCookieInfo(false); > > -if (Globals.IS_SECURITY_ENABLED || > Connector.RECYCLE_FACADES) { +if (getDiscardFacades()) { > parameterMap = new ParameterMap<>(); } else { > parameterMap.setLocked(false); @@ -506,7 +506,7 @@ public class > Request implements HttpServletRequest { > applicationMapping.recycle(); > > applicationRequest = null; -if (Globals.IS_SECURITY_ENABLED > || Connector.RECYCLE_FACADES) { +if (getDiscardFacades()) > { if (facade != null) { facade.clear(); facade = null; @@ -586,6 > +586,16 @@ public class Request implements HttpServletRequest { > > > /** + * Get the recycling strategy of the facade objects. + > * @return the value of the flag as set on the connector, or + * > true if no connector is associated with this request + > */ +public boolean getDiscardFacades() { +return > (
Re: [tomcat] branch 9.0.x updated: Add new connector attribute to control facade recycling
On Fri, Jan 24, 2020 at 8:11 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Rémy, > > On 1/23/20 4:28 AM, r...@apache.org wrote: > > This is an automated email from the ASF dual-hosted git > > repository. > > > > remm pushed a commit to branch 9.0.x in repository > > https://gitbox.apache.org/repos/asf/tomcat.git > > > > > > The following commit(s) were added to refs/heads/9.0.x by this > > push: new d5dce75 Add new connector attribute to control facade > > recycling d5dce75 is described below > > > > commit d5dce75b5c55194065f585c9a0b9cf606eb3a165 Author: remm > > AuthorDate: Wed Jan 22 15:35:37 2020 +0100 > > > > Add new connector attribute to control facade recycling > > > > Use the same default as before, using the system property and false > > if not set. > > Did you intend to change the public interface of this class? > > RECYCLE_FACADES -> (gone) > > IMO it's too late in 9.0.x / 8.5.x / 7.0.x to remove this. Tomcat 10 > is fine, but this constant should remain in the other versions. > Ooops, I never thought of that constant that way but I agree. I'll add it back undocumented. Rémy > > - -chris > > > --- java/org/apache/catalina/connector/Connector.java | 38 > > ++- > > java/org/apache/catalina/connector/Request.java | 14 +++-- > > java/org/apache/catalina/connector/Response.java | 3 +- > > webapps/docs/changelog.xml| 4 +++ > > webapps/docs/config/http.xml | 11 +++ > > webapps/docs/security-howto.xml | 10 +++--- 6 > > files changed, 64 insertions(+), 16 deletions(-) > > > > diff --git a/java/org/apache/catalina/connector/Connector.java > > b/java/org/apache/catalina/connector/Connector.java index > > 515d2af..d54927c 100644 --- > > a/java/org/apache/catalina/connector/Connector.java +++ > > b/java/org/apache/catalina/connector/Connector.java @@ -25,6 +25,7 > > @@ import java.util.HashSet; > > > > import javax.management.ObjectName; > > > > +import org.apache.catalina.Globals; import > > org.apache.catalina.LifecycleException; import > > org.apache.catalina.LifecycleState; import > > org.apache.catalina.Service; @@ -56,13 +57,6 @@ public class > > Connector extends LifecycleMBeanBase { private static final Log > > log = LogFactory.getLog(Connector.class); > > > > > > -/** - * Alternate flag to enable recycling of facades. - > > */ -public static final boolean RECYCLE_FACADES = - > > Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector > .RECYCLE_FACADES", > > "false")); - - public static final String INTERNAL_EXECUTOR_NAME = > > "Internal"; > > > > > > @@ -165,6 +159,17 @@ public class Connector extends > > LifecycleMBeanBase { > > > > > > /** + * The flag that controls recycling of the facades of the > > request + * processing objects. If set to true the > > object facades + * will be discarded when the request is > > recycled. If the security + * manager is enabled, this setting > > is ignored and object facades are + * always discarded. + > > */ +protected boolean discardFacades = + > > Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector > .RECYCLE_FACADES", > > "false")); + + +/** * The redirect port for non-SSL to SSL > > redirects. */ protected int redirectPort = 443; @@ -373,6 +378,25 > > @@ public class Connector extends LifecycleMBeanBase { > > > > > > /** + * @return true if the object facades are > > discarded, either + * when the discardFacades value is > > true or when the + * security manager is > > enabled. + */ +public boolean getDiscardFacades() { + > > return discardFacades || Globals.IS_SECURITY_ENABLED; +} + + + > > /** + * Set the recycling strategy for the object facades. + > > * @param discardFacades the new value of the flag + */ + > > public void setDiscardFacades(boolean discardFacades) { + > > this.discardFacades = discardFacades; +} + + +/** * @return > > the "enable DNS lookups" flag. */ public boolean getEnableLookups() > > { diff --git a/java/org/apache/catalina/connector/Request.java > > b/java/org/apache/catalina/connector/Request.java index > > 841049a..7f27bdd 100644 --- > > a/java/org/apache/catalina/connector/Request.java +++ > > b/java/org/apache/catalina/connector/Request.java @@ -495,7 +495,7 > > @@ public class Request implements HttpServletRequest { > > recycleSessionInfo(); recycleCookieInfo(false); > > > > -if (Globals.IS_SECURITY_ENABLED || > > Connector.RECYCLE_FACADES) { +if (getDiscardFacades()) { > > parameterMap = new ParameterMap<>(); } else { > > parameterMap.setLocked(false); @@ -506,7 +506,7 @@ public class > > Request implements HttpServletRequest { > > applicationMapping.recycle(); > > > > applicationRequest = null; -if (Globals.IS_SECURITY_ENABLED > > || Connector.RECYCLE_FACADES) { +if (getDiscardFacades()) > > { if (fac
[tomcat] branch 9.0.x updated: Restore constant to avoid unwanted API change
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 39b8baf Restore constant to avoid unwanted API change 39b8baf is described below commit 39b8baf147af9fc9cbb98bf400792f962c0c4e68 Author: remm AuthorDate: Fri Jan 24 21:00:58 2020 +0100 Restore constant to avoid unwanted API change --- java/org/apache/catalina/connector/Connector.java | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index d54927c..0fe6dc6 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/catalina/connector/Connector.java @@ -57,6 +57,13 @@ public class Connector extends LifecycleMBeanBase { private static final Log log = LogFactory.getLog(Connector.class); +/** + * Alternate flag to enable recycling of facades. + */ +public static final boolean RECYCLE_FACADES = + Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector.RECYCLE_FACADES", "false")); + + public static final String INTERNAL_EXECUTOR_NAME = "Internal"; @@ -165,8 +172,7 @@ public class Connector extends LifecycleMBeanBase { * manager is enabled, this setting is ignored and object facades are * always discarded. */ -protected boolean discardFacades = - Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector.RECYCLE_FACADES", "false")); +protected boolean discardFacades = RECYCLE_FACADES; /** - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Restore constant to avoid unwanted API change
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new a08ad79 Restore constant to avoid unwanted API change a08ad79 is described below commit a08ad79be649cc6808b7344e98efcd71a3adb3ff Author: remm AuthorDate: Fri Jan 24 21:00:58 2020 +0100 Restore constant to avoid unwanted API change --- java/org/apache/catalina/connector/Connector.java | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index b2f9ec4..518893c 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/catalina/connector/Connector.java @@ -57,6 +57,13 @@ public class Connector extends LifecycleMBeanBase { private static final Log log = LogFactory.getLog(Connector.class); +/** + * Alternate flag to enable recycling of facades. + */ +public static final boolean RECYCLE_FACADES = + Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector.RECYCLE_FACADES", "false")); + + public static final String INTERNAL_EXECUTOR_NAME = "Internal"; @@ -153,8 +160,7 @@ public class Connector extends LifecycleMBeanBase { * manager is enabled, this setting is ignored and object facades are * always discarded. */ -protected boolean discardFacades = - Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector.RECYCLE_FACADES", "false")); +protected boolean discardFacades = RECYCLE_FACADES; /** - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 7.0.x updated: Restore constant to avoid unwanted API change
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/7.0.x by this push: new 0eaefa3 Restore constant to avoid unwanted API change 0eaefa3 is described below commit 0eaefa3649c7a42fa0cb047b9d0495b3c1230c6e Author: remm AuthorDate: Fri Jan 24 21:00:58 2020 +0100 Restore constant to avoid unwanted API change --- java/org/apache/catalina/connector/Connector.java | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index f95fab9..dc1c4e3 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/catalina/connector/Connector.java @@ -49,6 +49,14 @@ public class Connector extends LifecycleMBeanBase { private static final Log log = LogFactory.getLog(Connector.class); + +/** + * Alternate flag to enable recycling of facades. + */ +public static final boolean RECYCLE_FACADES = + Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector.RECYCLE_FACADES", "false")); + + // Constructor public Connector() { @@ -139,8 +147,7 @@ public class Connector extends LifecycleMBeanBase { * manager is enabled, this setting is ignored and object facades are * always discarded. */ -protected boolean discardFacades = - Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector.RECYCLE_FACADES", "false")); +protected boolean discardFacades = RECYCLE_FACADES; /** - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082 --- Comment #8 from william.crow...@roguewave.com --- > Are you also able to reliably reproduce the error without RECYCLE_FACADES > enabled? Yes, it happens on each test run. > Tomcat (usually) properly protects these objects from shared-use, but > applications have minds of their own. Are issues like this usually application related? > What kind of request-load are you expecting? Let me check on this. > My guess is that correctness is more important than performance. Yes, that is correct. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 64082] Nio2Endpoint for async request doesn't clear OutputBuffer when socket has already been closed (response mixup)
https://bz.apache.org/bugzilla/show_bug.cgi?id=64082 --- Comment #9 from Christopher Schultz --- (In reply to william.crowell from comment #8) > > Are you also able to reliably reproduce the error without RECYCLE_FACADES > > enabled? > > Yes, it happens on each test run. Great. > > Tomcat (usually) properly protects these objects from shared-use, but > > applications have minds of their own. > > Are issues like this usually application related? Almost always. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org