RE: Database Connection Requests Initiated but Not Sent on the Wire (Some, Not All)

2024-05-30 Thread Eric Robinson
Hi Mark, > -Original Message- > From: Mark Thomas > Sent: Thursday, May 30, 2024 9:30 AM > To: users@tomcat.apache.org > Subject: Re: Database Connection Requests Initiated but Not Sent on the Wire > (Some, Not All) > > OK. > > This is an interim binary patch for 9.0.80 only. > > The

RE: Write listener question

2024-05-30 Thread joan.balaguero
Trying to simplify the code was a mistake ... private static final int WRITE_BUFFER_SIZE = 8 * 1024; <-- with 32K fails on this client private final AsyncContext ac; private final ServletResponse sr; private ServletOutputStream os; private boolean firstTime = true; private byte[]

Re: Write listener question

2024-05-30 Thread Chuck Caldarale
> On May 30, 2024, at 12:53, > wrote: > > isFirst is initialized to 'true' when the class is instantiated, so that > piece of code is just executed the first time the execution enters the ' > onWritePossible' method. Later, within the same 'if', 'isFirst' is set to > false, (not shown in the

RE: Write listener question

2024-05-30 Thread joan.balaguero
Hi Chuck, isFirst is initialized to 'true' when the class is instantiated, so that piece of code is just executed the first time the execution enters the ' onWritePossible' method. Later, within the same 'if', 'isFirst' is set to false, (not shown in the code, sorry) Perhaps this one client has

Re: Write listener question

2024-05-30 Thread Chuck Caldarale
> On May 30, 2024, at 08:47, > wrote: > > I have a NIO connector with an asynchronous servlet with its write listener > (working in both tomcat 8.5 and tomcat 10.1.20). > > @Override > public void onWritePossible() throws IOException { > > if (this.isFirst) { >this.os =

Re: Database Connection Requests Initiated but Not Sent on the Wire (Some, Not All)

2024-05-30 Thread Konstantin Kolinko
ср, 29 мая 2024 г. в 13:34, Mark Thomas : > > > > It is also problem number 3. The reason it is expensive is that class > loaders don't cache misses so if a web application has a large number of > JARs, they all get scanned every time the DriverManager tries to create > a new connection. > > > The

Re: Database Connection Requests Initiated but Not Sent on the Wire (Some, Not All)

2024-05-30 Thread Mark Thomas
OK. This is an interim binary patch for 9.0.80 only. The purpose is to: - confirm the proposed change fixes the problem - provide you with a workaround in the short term This is the binary patch: https://people.apache.org/~markt/dev/classloader-not-found-cache-9.0.80-v1.zip Extract the

Re: context.xml file location

2024-05-30 Thread Christopher Schultz
Hello, On 5/30/24 10:12, firstName lastName wrote: Renaming my context.xml to ROOT.xml (without changing the folder) fixed the problem. Thanks for the help! The best practice would be to put your context.xml file into your WAR file's META-INF/context.xml path. That way, it will be deployed

Re: context.xml file location

2024-05-30 Thread firstName lastName
Renaming my context.xml to ROOT.xml (without changing the folder) fixed the problem. Thanks for the help! On Thu, May 30, 2024 at 8:42 AM David Rush wrote: > I don't know about any docker-related differences, but > > I think that if you put a context config file under Catalina/localhost you

Write listener question

2024-05-30 Thread joan.balaguero
Hello, Sorry for the previous mail ... I have a NIO connector with an asynchronous servlet with its write listener (working in both tomcat 8.5 and tomcat 10.1.20). @Override public void onWritePossible() throws IOException { if (this.isFirst) { this.os =

Re: context.xml file location

2024-05-30 Thread David Rush
I don't know about any docker-related differences, but I think that if you put a context config file under Catalina/localhost you need to name the .xml file the same as your .war file. So if you have foo.war, then you'd have Catalina/localhost/foo.xml You can also put a file named

context.xml file location

2024-05-30 Thread firstName lastName
I am trying to setup JNDI for tomcat with a java webapp. I am using the official tomcat docker image (version 10.1.24-jdk21-temurin-jammy). However, I'm a bit confused about where to put the context.xml file. I tried putting it in /usr/local/tomcat/conf/Catalina/localhost/context.xml but tomcat

Need help installing SSL certificate in tomcat keystore

2024-05-30 Thread Fung-A-Fat, Mark
I am running a java web app on windows 2019 server and need some help getting the SSL certificate installed into my keystore. I am running tomcat 9.x and java 11 I am able to generate a certificate request using both keytool and/or openssl For both the CSR file looks like this, but the

Re: PersistentManager and ClassNotFoundException

2024-05-30 Thread Jakub Królikowski
Hi Christopher, On Thu, May 30, 2024 at 1:40 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > Jakub, > > On 5/30/24 05:25, Jakub Królikowski wrote: > >> Where is your configuration located? It *should* be inside > >> your located in META-INF/context.xml in your web application.

Re: Write listener question

2024-05-30 Thread Christopher Schultz
Joan, Please don't hijack threads. Start a new message to the list without replying to an existing one. -chris On 5/30/24 06:03, joan.balagu...@ventusproxy.com wrote: Sorry, this issue happens with both Tomcat 8.5.x and 10.1.x. -Original Message- From:

Re: PersistentManager and ClassNotFoundException

2024-05-30 Thread Christopher Schultz
Jakub, On 5/30/24 05:25, Jakub Królikowski wrote: Where is your configuration located? It *should* be inside your located in META-INF/context.xml in your web application. If it's in there, then everything it does should be in the context (and ClassLoader) of your web application -- where your

Re: Database Connection Requests Initiated but Not Sent on the Wire (Some, Not All)

2024-05-30 Thread Christopher Schultz
Eric, On 5/29/24 12:10, Eric Robinson wrote: -Original Message- From: Mark Thomas Sent: Wednesday, May 29, 2024 10:19 AM To: users@tomcat.apache.org Subject: Re: Database Connection Requests Initiated but Not Sent on the Wire (Some, Not All) On 29/05/2024 16:08, Eric Robinson wrote:

RE: Write listener question

2024-05-30 Thread joan.balaguero
Sorry, this issue happens with both Tomcat 8.5.x and 10.1.x. -Original Message- From: joan.balagu...@ventusproxy.com Sent: Thursday, May 30, 2024 11:57 AM To: 'Tomcat Users List' Subject: Write listener question Hello, I have a NIO connector with an asynchronous servlet with its

Write listener question

2024-05-30 Thread joan.balaguero
Hello, I have a NIO connector with an asynchronous servlet with its write listener. @Override public void onWritePossible() throws IOException { if (this.isFirst) { this.os = this.asyncContext.getResponse().getOutputStream(); this.startIdx = 0; this.endIdx = WRITE_BUFFER_SIZE;

Re: PersistentManager and ClassNotFoundException

2024-05-30 Thread Jakub Królikowski
Hello Chris, On Tue, May 28, 2024 at 6:38 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > Jakub, > > On 5/24/24 09:31, Jakub Królikowski wrote: > > On Fri, May 24, 2024 at 11:23 AM Mark Thomas wrote: > > > >> Can you provide the simplest web application (with source) that > >>

Re: Database Connection Requests Initiated but Not Sent on the Wire (Some, Not All)

2024-05-30 Thread Mark Thomas
On 29/05/2024 17:03, Eric Robinson wrote: One of the webapps is related to voice reminder messages that go out to people. The reminders go out sometime after 9 am, which tracks with the slowdowns. Ack. Something to try while I work on a patch is setting archiveIndexStrategy="bloom" on