[GitHub] [tomcat] EruDev opened a new pull request #290: If the log is info level, modify catalina init time

2020-05-21 Thread GitBox


EruDev opened a new pull request #290:
URL: https://github.com/apache/tomcat/pull/290


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Correct regression in loading of config files via URIs on Windows.

2020-05-21 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new e652925  Correct regression in loading of config files via URIs on 
Windows.
e652925 is described below

commit e6529257ce5190b9c28c1102f1e0f277f1892ac8
Author: Mark Thomas 
AuthorDate: Thu May 21 10:32:10 2020 +0100

Correct regression in loading of config files via URIs on Windows.
---
 .../startup/CatalinaBaseConfigurationSource.java | 20 
 webapps/docs/changelog.xml   |  4 
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git 
a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java 
b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
index 53fb91f..51615bb 100644
--- a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
+++ b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
@@ -90,17 +90,21 @@ public class CatalinaBaseConfigurationSource implements 
ConfigurationSource {
 }
 
 // Try classloader
-InputStream stream = 
getClass().getClassLoader().getResourceAsStream(name);
-if (stream != null) {
-try {
+InputStream stream = null;
+try {
+stream = getClass().getClassLoader().getResourceAsStream(name);
+if (stream != null) {
 return new Resource(stream, 
getClass().getClassLoader().getResource(name).toURI());
-} catch (InvalidPathException e) {
-// Ignore. Some valid file URIs can trigger this.
-stream.close();
-} catch (URISyntaxException e) {
+}
+} catch (InvalidPathException e) {
+// Ignore. Some valid file URIs can trigger this.
+// Stream should be null here but check to be on the safe side.
+if (stream != null) {
 stream.close();
-throw new 
IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name), 
e);
 }
+} catch (URISyntaxException e) {
+stream.close();
+throw new 
IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name), 
e);
 }
 
 // Then try URI.
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 57c981c..38f200d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -60,6 +60,10 @@
 Add the special internal rewrite maps for case modification and
 escaping. (remm/fschumacher)
   
+  
+Correct a regression in an earlier fix that broke the loading of
+configuration files such as keystores via URIs on Windows. (markt)
+  
 
   
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Correct regression in loading of config files via URIs on Windows.

2020-05-21 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 3756bc6  Correct regression in loading of config files via URIs on 
Windows.
3756bc6 is described below

commit 3756bc6a90576f06802669fd5454b21412a88809
Author: Mark Thomas 
AuthorDate: Thu May 21 10:32:10 2020 +0100

Correct regression in loading of config files via URIs on Windows.
---
 .../startup/CatalinaBaseConfigurationSource.java | 20 
 webapps/docs/changelog.xml   |  4 
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git 
a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java 
b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
index 53fb91f..51615bb 100644
--- a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
+++ b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
@@ -90,17 +90,21 @@ public class CatalinaBaseConfigurationSource implements 
ConfigurationSource {
 }
 
 // Try classloader
-InputStream stream = 
getClass().getClassLoader().getResourceAsStream(name);
-if (stream != null) {
-try {
+InputStream stream = null;
+try {
+stream = getClass().getClassLoader().getResourceAsStream(name);
+if (stream != null) {
 return new Resource(stream, 
getClass().getClassLoader().getResource(name).toURI());
-} catch (InvalidPathException e) {
-// Ignore. Some valid file URIs can trigger this.
-stream.close();
-} catch (URISyntaxException e) {
+}
+} catch (InvalidPathException e) {
+// Ignore. Some valid file URIs can trigger this.
+// Stream should be null here but check to be on the safe side.
+if (stream != null) {
 stream.close();
-throw new 
IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name), 
e);
 }
+} catch (URISyntaxException e) {
+stream.close();
+throw new 
IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name), 
e);
 }
 
 // Then try URI.
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7011281..d7a6873 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -60,6 +60,10 @@
 Add the special internal rewrite maps for case modification and
 escaping. (remm/fschumacher)
   
+  
+Correct a regression in an earlier fix that broke the loading of
+configuration files such as keystores via URIs on Windows. (markt)
+  
 
   
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Tomcat Docker using AdoptOpenJDK-OpenJ9

2020-05-21 Thread Martin Grigorov
On Mon, May 18, 2020 at 2:45 PM kusuma chalasani 
wrote:

> Hi all,
>
> I'm a Performance Analyst for JVM runtime. I recently tried out some
> experiments to compare Tomcat startup performance in Docker using
> AdoptOpenJDK-OpenJ9
>
> I found I was able to get ~30% faster startup time with very minimal
> change in footprint when I enable SharedClass Cache when I compared to the
> default(which is No Shareclasses). I wrote a detailed blog post here
> https://blog.openj9.org/2020/05/18/startup-performance-of-tomcat-in-docker/   
> where
> I outlined what and how I measured.
>
> I also did raise a PR for the same -
> https://github.com/docker-library/tomcat/pull/202
>
> We figured we'd reach out to you guys so you can take a look, and maybe
> try it out and let us know if you have any comments/questions.
>

Thank you for sharing your findings with us, Kusuma!


>
>
> Thanks,
> Kusuma.
>