I get the emails but how can I send an email for assistance?


________________________________
From: jkla...@iki.fi <jkla...@iki.fi>
Sent: Tuesday, November 23, 2021 8:23:50 AM
To: users@tomcat.apache.org <users@tomcat.apache.org>
Subject: [External] Handling database connection pooling outside Java, without 
DBCP et al?

This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links 
and attachments.

I've been tasked with the maintenance of a client's legacy Tomcat 8.0 
application servers. The person who initially configured Tomcat on them is no 
longer with the company, and I've basically been thrown into the deep end with 
no prior Tomcat or Java knowledge. Their Java developers are also unfamiliar 
with the Tomcat setup. I've been reading through a bunch of documentation to 
try to make sense of it all, so excuse my extreme newbieness.

The servers are running a single Java application under Tomcat that connects to 
a MySQL server. The data sources are configured in the META-INF/context.xml 
file of the Java application. It contains a bunch of Resource elements with the 
javax.sql.DataSource type.

We're in the process of adopting ProxySQL in front of MySQL, to act as the 
connection pooler and for separating read and write traffic to different 
database instances. After this, we have no need for DBCP or any other 
Java-level pooling – in fact, having two levels of connection pooling would 
probably be detrimental to performance, and certainly to our ability to 
diagnose issues.

Trouble is, based on my reading of the JNDI Resources HOW-TO, the Java EE specs 
require that the data source implementation features connection pooling, and 
Tomcat follows this. Accordingly, the Resource element features a bunch of 
pooling-related DBCP attributes.

I haven't been able to figure out how to entirely disable DBCP so that ProxySQL 
could handle the pooling entirely. I can leave out the pooling-related Resource 
attributes, but that probably just causes a bunch of defaults to be used. I 
could maybe configure a "pool" of one connection on the Java side, but my 
intuition says that's a bad idea, and I'm not sure how to do it anyway. What 
seems the most realistic option is configuring the MySQL connection in some 
other, non-pooled fashion outside Tomcat, but I don't know how. With the last 
option, it would have to be something that requires minimal code changes in the 
Java application.

Any guidance would be appreciated.

- JK

________________________________

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise confidential information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the e-mail by you is prohibited. Where allowed by local law, electronic 
communications with Accenture and its affiliates, including e-mail and instant 
messaging (including content), may be scanned by our systems for the purposes 
of information security and assessment of internal compliance with Accenture 
policy. Your privacy is important to us. Accenture uses your personal data only 
in compliance with data protection laws. For further information on how 
Accenture processes your personal data, please see our privacy statement at 
https://www.accenture.com/us-en/privacy-policy.
______________________________________________________________________________________

www.accenture.com

Reply via email to