Re: Tomcat Secure WebSockets clients - hostname verification

2019-10-09 Thread Gary Sheppard
On Wed, Oct 9, 2019, 18:11 Gary Sheppard wrote: > On Tue, Jun 12, 2018 at 12:13 Mark Thomas wrote: > > >> It would be very useful to be able to configure this, so if you are > >> going to patch the code, please make this configurable by the client. > >> See HttpsURLConnection.setHostnameVerifier

NPE in DBCP when attempting to connect to a database that doesn't exist

2019-10-09 Thread Adam Rauch
When attempting to connect to a DataSource that specifies a database that doesn't exist, Tomcat 8.5.46 throws an informative SQLException; for example: java.sql.SQLException: Cannot create PoolableConnectionFactory (FATAL: database "labkey19.3" does not exist) In the same situation, Tomcat

Re: Tomcat Secure WebSockets clients - hostname verification

2019-10-09 Thread Gary Sheppard
On Tue, Jun 12, 2018 at 12:13 Mark Thomas wrote: >> It would be very useful to be able to configure this, so if you are >> going to patch the code, please make this configurable by the client. >> See HttpsURLConnection.setHostnameVerifier >> >> I think it's appropriate to simply match that API

RE: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib

2019-10-09 Thread Rhuberg,Anthony
I have not seen the trace message for modified()... So my understanding of this is wrong. -Original Message- From: Paul Carter-Brown Sent: Wednesday, October 09, 2019 4:42 PM To: Tomcat Users List Subject: Re: Performance test with Tomcat 9 shows increased cpu/disk usage because of

RE: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib

2019-10-09 Thread Rhuberg,Anthony
StandardRoot.gc() unconditionally closes the web application jars in Tomcat 9... every 10s by default or configurable by changing backgroundProcessorDelay. So then the problem is Our web application is calling class.getResourceAsStream() to read some static files... and this is causing the

Re: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib

2019-10-09 Thread Mark Thomas
On 09/10/2019 21:03, Rhuberg,Anthony wrote: > This seems to alleviate the issue... in context.xml (sc-test#sc.xml) > backgroundProcessorDelay="90"> > > Not sure if this is the context reload trigger... i.e. the > webappLoader.backgroundProcess method is triggered every 90 seconds... It isn't.

Re: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib

2019-10-09 Thread Paul Carter-Brown
Hi Anthony Have you turned debug logging on to see what it is picking up as modified? On Wed, 09 Oct 2019, 22:24 Rhuberg,Anthony, wrote: > Thanks for your responses. > > I understand that re-reading the static files is not optimal, but how does > reading files from the jar affect them being

RE: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib

2019-10-09 Thread Rhuberg,Anthony
Thanks for your responses. I understand that re-reading the static files is not optimal, but how does reading files from the jar affect them being reloaded... In Tomcat 7, that seemed to prevent the jars from being reloaded since the accessTime was changed; in Tomcat 8, it seems the modified()

Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Rony, On 10/9/19 07:08, Rony G. Flatscher (Apache) wrote: > On 08.10.2019 21:16, André Warnier (tomcat) wrote: >> On 08.10.2019 17:11, Rony G. Flatscher (Apache) wrote: >>> Does anyone know of any tutorials that would demonstrate how to >>> use any

RE: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib

2019-10-09 Thread Rhuberg,Anthony
This seems to alleviate the issue... in context.xml (sc-test#sc.xml) Not sure if this is the context reload trigger... i.e. the webappLoader.backgroundProcess method is triggered every 90 seconds... the reloadable property on Context is NOT set (default = false). So then how does modified()

Re: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib

2019-10-09 Thread Mark Thomas
On 09/10/2019 20:08, Rhuberg,Anthony wrote: > On the other thread: Is this genuine class loading (in which case the > response below is correct) or is the application reading the .class files as > if they were > resources (in which case a different answer applies)? > Mostly, we are talking about

RE: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib

2019-10-09 Thread Rhuberg,Anthony
On the other thread: Is this genuine class loading (in which case the response below is correct) or is the application reading the .class files as if they were resources (in which case a different answer applies)? Mostly, we are talking about the default class loader; however, the application

RE: Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib

2019-10-09 Thread Rhuberg,Anthony
Just noticed another thread on this topic: RE: Tomcat discards and reloads the jar files from the webapps folder. Setting the Engine attribute backgroundProcessorDelay to 90s does reduce the open/close cycle of the jars. The other thread also mentioned a potential configuration to keep the

Performance test with Tomcat 9 shows increased cpu/disk usage because of repeated opening/closing of jars in WEB-INF/lib

2019-10-09 Thread Rhuberg,Anthony
Background: In the last few months we migrated our web application from Tomcat 7.0.55 to Tomcat 9.0.19 (26). That transition was relatively straightforward until we reviewed the results of our performance tests. Those tests showed an increase in CPU usage and disk I/O on our Windows 2012

Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-09 Thread Konstantin Kolinko
вт, 8 окт. 2019 г. в 18:11, Rony G. Flatscher (Apache) : > > Does anyone know of any tutorials that would demonstrate how to use any > javax.script language in > JSPs instead of Java (e.g. using Jython or JavaScript instead)? > > If not, any advice/hint how to realize/create such a functionality

RE: Tomcat discards and reloads the jar files from the webapps folder.

2019-10-09 Thread Duca,Cristian
Yes, it is the default loader. -Original Message- From: Mark Thomas Sent: Wednesday, 9 October, 2019 15:57 To: users@tomcat.apache.org Subject: Re: Tomcat discards and reloads the jar files from the webapps folder. On 09/10/2019 13:04, Duca,Cristian wrote: > Hello, > > I have tried

Re: Tomcat discards and reloads the jar files from the webapps folder.

2019-10-09 Thread Mark Thomas
On 09/10/2019 13:04, Duca,Cristian wrote: > Hello, > > I have tried adding the following property: backgroundProcessorDelay="90" > This is an Attribute corresponding to the Engine > > I have added he setting as it follows in server.xml >backgroundProcessorDelay="90"> > > After the jvm

RE: Tomcat discards and reloads the jar files from the webapps folder.

2019-10-09 Thread Duca,Cristian
Hello, I have tried adding the following property: backgroundProcessorDelay="90" This is an Attribute corresponding to the Engine I have added he setting as it follows in server.xml After the jvm has been initialized there was no impact in the jar discard/reload, tomcat9 does the same

Re: Tomcat discards and reloads the jar files from the webapps folder.

2019-10-09 Thread Mark Thomas
On 09/10/2019 11:43, Duca,Cristian wrote: > Hello, > > The web application is trying to load specific classes from the jar files. Is this genuine class loading (in which case the response below is correct) or is the application reading the .class files as if they were resources (in which case a

Re: user self registration/account creation

2019-10-09 Thread Stephane Passignat
If you don't know at all about your users (like a public website) you'll need a non protected page for the selft registration. But if you know a little about your users, like for an intranet, extranet application; when users are already registered in an LDAP or any kind of Authentication

Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-09 Thread Rony G. Flatscher (Apache)
On 08.10.2019 21:16, André Warnier (tomcat) wrote: > On 08.10.2019 17:11, Rony G. Flatscher (Apache) wrote: >> Does anyone know of any tutorials that would demonstrate how to use any >> javax.script language in >> JSPs instead of Java (e.g. using Jython or JavaScript instead)? >> >> If not, any

RE: Tomcat discards and reloads the jar files from the webapps folder.

2019-10-09 Thread Duca,Cristian
Hello, The web application is trying to load specific classes from the jar files. The main idea is that in tomcat7 the jar files were kept in memory and when the web application required a specific class the jvm fetched it from memory. With tomcat9 when the web application requires a specific

Re: Tomcat discards and reloads the jar files from the webapps folder.

2019-10-09 Thread Mark Thomas
On 09/10/2019 11:36, Duca,Cristian wrote: > Hello, > > We upgraded our tomcat from 7 to 9 and we observed the following: > > * In tomcat9 the jar files from the webapps folder are discarded and > reloaded -> this creates extra input/output operations which increase our CPU > Usage. > *

Tomcat discards and reloads the jar files from the webapps folder.

2019-10-09 Thread Duca,Cristian
Hello, We upgraded our tomcat from 7 to 9 and we observed the following: * In tomcat9 the jar files from the webapps folder are discarded and reloaded -> this creates extra input/output operations which increase our CPU Usage. * In tomcat7 the jar files were kept loaded in memory and

Re: Acessing static content - Tomcat 7 vs. Tomcat9

2019-10-09 Thread Martin Knoblauch
On Tue, Oct 8, 2019 at 9:02 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Martin, > > > > Sorry, I actually didn't notice the "LoadModule" in there. > > It's strange to see a LoadModule and the other configuration all >