Re: JDBC connection pooling maxActive or MaxTotal

2020-01-03 Thread zahid

chris,


Is commons-dbcp-2.x   a Database pooling component for any container 
Jetty,Jboss tomcat   etc. ?


is commons-dbcp-2.x a third option, separate option from the two pooling 
options [tomcat-pool and commons-pool] you mentioned ?



On 03/01/2020 23:21, Dave Bothwell wrote:

Chris,

That was very helpful.

Thank you
Dave



On Fri, Jan 3, 2020 at 5:29 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Dave,

On 1/3/20 13:47, Dave Bothwell wrote:

I am using Tomcat 8.5.11 with JDBC connection pooling. Based on
the documentation it is clear that DBCP pooling has changed the
maxActive attribute to maxTotal. However it is unclear, based on
this document
https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html, if JDBC
pooling has also changed maxActive to maxTotal.

my question is which attribute should I be using?

Are you asking about the difference between configurations for
tomcat-pool and commons-pool?

commons-pool (which is the default connection-pool in Tomcat) uses
maxTotal.

tomcat-pool (which is NOT the default connection-pool in Tomcat) uses
maxActive.


Also, I am currently using both attributes maxActive and maxTotal
in my current server.xml file, which does not appear to be causing
any issues.

If you use both, you should be all set for whichever pool you use at
runtime. Note that you will have to specifically enable tomcat-pool,
so it's unlikely that the pooling-library in use will be a surprise.

If you look in your log file, you will notice that when Tomcat starts
up it will give you a warning that one of the two configuration
options failed to apply to whichever pool you are using. It is a
warning, not an error, so you can ignore it. But it will show up in
your log file every time.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4PwFkACgkQHPApP6U8
pFiEZRAAloB5RkBB0HrUvYfHd2DJbR5h2xt2WxaKbK6Rql/cdjVEC1dftrGSL9a7
EvFkFl8juTA0oD/9mjGHKtN1MLgV+EFEu5hTppR+3wnkX/8djwp8L27AmtQ/xcT8
/5vasZfn8Web/WqJIJGVF9BiEHoUCr4+M7G+PA8rvsskpIAZKux9NhbliDUYUwzi
R7GsjNelBKixCa8Qy5Q7LqNcHN4RDygXKYsLZVoeoliEBaUOTWHeLoXAo6BQYsVW
Tce5S3xePN6ZG3A5o5lT2bIjWKJp4qDu2CgPHJ0TQyAuey4rpkYmeI7uesmZhr6T
XpwWnk8kYLG7ZCRR99KBF0lx67PQmtxZLoN4kDYQ77x7XUW5c/Qsv2PcOcvXmbzk
iau8YsitqivEAtRh68XG4wrK37vGfkGNzTaSPzpZqgCIiJCotIV6mwQMjo97Ium/
lxSTjLhLEkLNDegHk43wiW02AYfn+2FA0QBTiNX5OoWKu2YD/wrWnmljDwQKO6qL
/ycYDnUCjkcmi0NZJil1kJtB2p8EKwy67W7PPRg2sf2VadFgifJlxO326UW1qK+e
Gv8RjXgEHVOt2ydTa6sTFXT1fjcHaojVx5XgEK19UKNIUcMkyOUh6cZ5N/8d9UMn
+jdZIx4hmxYshdoa4TO2JD6H8I087P8VNCL78RbeWTERUBBvvnc=
=jSNi
-END PGP SIGNATURE-

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



--
www.backbutton.co.uk
  ¯\_(ツ)_/¯
♡۶ Lynx text browser
recover crashed ms-word .doc with ms-debug.


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



Re: JDBC connection pooling maxActive or MaxTotal

2020-01-03 Thread Dave Bothwell
Chris,

That was very helpful.

Thank you
Dave



On Fri, Jan 3, 2020 at 5:29 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Dave,
>
> On 1/3/20 13:47, Dave Bothwell wrote:
> > I am using Tomcat 8.5.11 with JDBC connection pooling. Based on
> > the documentation it is clear that DBCP pooling has changed the
> > maxActive attribute to maxTotal. However it is unclear, based on
> > this document
> > https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html, if JDBC
> > pooling has also changed maxActive to maxTotal.
> >
> > my question is which attribute should I be using?
>
> Are you asking about the difference between configurations for
> tomcat-pool and commons-pool?
>
> commons-pool (which is the default connection-pool in Tomcat) uses
> maxTotal.
>
> tomcat-pool (which is NOT the default connection-pool in Tomcat) uses
> maxActive.
>
> > Also, I am currently using both attributes maxActive and maxTotal
> > in my current server.xml file, which does not appear to be causing
> > any issues.
> If you use both, you should be all set for whichever pool you use at
> runtime. Note that you will have to specifically enable tomcat-pool,
> so it's unlikely that the pooling-library in use will be a surprise.
>
> If you look in your log file, you will notice that when Tomcat starts
> up it will give you a warning that one of the two configuration
> options failed to apply to whichever pool you are using. It is a
> warning, not an error, so you can ignore it. But it will show up in
> your log file every time.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4PwFkACgkQHPApP6U8
> pFiEZRAAloB5RkBB0HrUvYfHd2DJbR5h2xt2WxaKbK6Rql/cdjVEC1dftrGSL9a7
> EvFkFl8juTA0oD/9mjGHKtN1MLgV+EFEu5hTppR+3wnkX/8djwp8L27AmtQ/xcT8
> /5vasZfn8Web/WqJIJGVF9BiEHoUCr4+M7G+PA8rvsskpIAZKux9NhbliDUYUwzi
> R7GsjNelBKixCa8Qy5Q7LqNcHN4RDygXKYsLZVoeoliEBaUOTWHeLoXAo6BQYsVW
> Tce5S3xePN6ZG3A5o5lT2bIjWKJp4qDu2CgPHJ0TQyAuey4rpkYmeI7uesmZhr6T
> XpwWnk8kYLG7ZCRR99KBF0lx67PQmtxZLoN4kDYQ77x7XUW5c/Qsv2PcOcvXmbzk
> iau8YsitqivEAtRh68XG4wrK37vGfkGNzTaSPzpZqgCIiJCotIV6mwQMjo97Ium/
> lxSTjLhLEkLNDegHk43wiW02AYfn+2FA0QBTiNX5OoWKu2YD/wrWnmljDwQKO6qL
> /ycYDnUCjkcmi0NZJil1kJtB2p8EKwy67W7PPRg2sf2VadFgifJlxO326UW1qK+e
> Gv8RjXgEHVOt2ydTa6sTFXT1fjcHaojVx5XgEK19UKNIUcMkyOUh6cZ5N/8d9UMn
> +jdZIx4hmxYshdoa4TO2JD6H8I087P8VNCL78RbeWTERUBBvvnc=
> =jSNi
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 



David Bothwell

Chairman of the Board, Chief technology Officer | Primepoint, LLC

Address: 2 Springside Road, Westampton, NJ 08060

Phone: 800-600-5257

-
-
-

- - 

-- 
This communication, and any information or attachments contained within, 
may contain privileged or confidential information that is intended for the 
sole use of the recipient or recipients named above. If the reader of this 
message is not an intended recipient, or authorized to receive such 
messages for an intended recipient, you are hereby notified that any 
review, use, dissemination, copying, or distribution of this communication, 
or any of its contents is strictly prohibited. If you have received this 
message in error, please notify us immediately of the error by return email 
and permanently remove the original message, its contents, and any copies 
from your system. Thank you.


Re: JDBC connection pooling maxActive or MaxTotal

2020-01-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Dave,

On 1/3/20 13:47, Dave Bothwell wrote:
> I am using Tomcat 8.5.11 with JDBC connection pooling. Based on
> the documentation it is clear that DBCP pooling has changed the
> maxActive attribute to maxTotal. However it is unclear, based on
> this document 
> https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html, if JDBC 
> pooling has also changed maxActive to maxTotal.
> 
> my question is which attribute should I be using?

Are you asking about the difference between configurations for
tomcat-pool and commons-pool?

commons-pool (which is the default connection-pool in Tomcat) uses
maxTotal.

tomcat-pool (which is NOT the default connection-pool in Tomcat) uses
maxActive.

> Also, I am currently using both attributes maxActive and maxTotal
> in my current server.xml file, which does not appear to be causing
> any issues.
If you use both, you should be all set for whichever pool you use at
runtime. Note that you will have to specifically enable tomcat-pool,
so it's unlikely that the pooling-library in use will be a surprise.

If you look in your log file, you will notice that when Tomcat starts
up it will give you a warning that one of the two configuration
options failed to apply to whichever pool you are using. It is a
warning, not an error, so you can ignore it. But it will show up in
your log file every time.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4PwFkACgkQHPApP6U8
pFiEZRAAloB5RkBB0HrUvYfHd2DJbR5h2xt2WxaKbK6Rql/cdjVEC1dftrGSL9a7
EvFkFl8juTA0oD/9mjGHKtN1MLgV+EFEu5hTppR+3wnkX/8djwp8L27AmtQ/xcT8
/5vasZfn8Web/WqJIJGVF9BiEHoUCr4+M7G+PA8rvsskpIAZKux9NhbliDUYUwzi
R7GsjNelBKixCa8Qy5Q7LqNcHN4RDygXKYsLZVoeoliEBaUOTWHeLoXAo6BQYsVW
Tce5S3xePN6ZG3A5o5lT2bIjWKJp4qDu2CgPHJ0TQyAuey4rpkYmeI7uesmZhr6T
XpwWnk8kYLG7ZCRR99KBF0lx67PQmtxZLoN4kDYQ77x7XUW5c/Qsv2PcOcvXmbzk
iau8YsitqivEAtRh68XG4wrK37vGfkGNzTaSPzpZqgCIiJCotIV6mwQMjo97Ium/
lxSTjLhLEkLNDegHk43wiW02AYfn+2FA0QBTiNX5OoWKu2YD/wrWnmljDwQKO6qL
/ycYDnUCjkcmi0NZJil1kJtB2p8EKwy67W7PPRg2sf2VadFgifJlxO326UW1qK+e
Gv8RjXgEHVOt2ydTa6sTFXT1fjcHaojVx5XgEK19UKNIUcMkyOUh6cZ5N/8d9UMn
+jdZIx4hmxYshdoa4TO2JD6H8I087P8VNCL78RbeWTERUBBvvnc=
=jSNi
-END PGP SIGNATURE-

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



Re: JDBC connection pooling maxActive or MaxTotal

2020-01-03 Thread zahid
|I hope these descriptions of the setting helps you in making a decision 
as to the value.  
|


|maxActive| (int) The maximum number of active connections that can be 
allocated from this pool at the same time. The default value is |100|||


|
|

On 03/01/2020 18:47, Dave Bothwell wrote:

Hello,

I am using Tomcat 8.5.11 with JDBC connection pooling. Based on the
documentation it is clear that DBCP pooling has changed the maxActive
attribute to maxTotal. However it is unclear, based on this document
https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html, if JDBC
pooling has also changed maxActive to maxTotal.

Also, I am currently using both attributes maxActive and maxTotal in my
current server.xml file, which does not appear to be causing any issues.

my question is which attribute should I be using?

Thanks
Dave


--
www.backbutton.co.uk
  ¯\_(ツ)_/¯
♡۶ Lynx text browser
recover crashed ms-word .doc with ms-debug.



Re: cvs update -dP

2020-01-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Zahid,

On 1/2/20 22:20, zahid wrote:
> Document update suggestion.
> 
> Keeping in mind the documents are implied as step by step
> instructions.
> 
> The instruction |cvs update -dP  could get complicated for some 
> developers due to |missing perquisites steps on page 
> http://tomcat.apache.org/tomcat-9.0-doc/appdev/source.html|

As mentioned previously, that page needs a complete overhaul, or
possibly deletion. Nobody uses CVS anymore.

Everything should be switched to Git, or even Subversion.
> I also noticed on another mailing list some people, who even work
> as a pair still couldn't get "up and running" with the supplied
> maven archetype examples.

We don't supply any Maven archetypes.

> Due to the fact mvn command line |||argument(s) { javafx:run ||
> jetty:run ] |was not mentioned  .|

It's unlikely that Tomcat has any guides showing how to launch Jetty.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4PjLMACgkQHPApP6U8
pFjPng/8C769ctnFWqZiHHD2UFCbqbH0W0DFdJMcPvDHLEAM2j2sR7m+N8P3PGjw
ePZO2X0+mUbPhLChK7j597DM3JELBlUKpbsPTdUZ6AgwCQEnUYv9AmspRp8HMMYh
WkNJiqZ7KMBWaQR5MjVCunjXo2A/BamIvlhu7c6nSjRbWqMU95BFkpSqF+OqPEgE
oPr1Co1NENjhZPnjBfRBT0leVlQJrfLJy2qjX2wQly0n931xMKup/xOjjBTg/nyZ
hCAlCYfYPOBPZIWh7m+8AF3cvWatICNvJcjwZQerwkq6FL8P3LBavPCI+MMoYv2+
5vj/JnU3Mfdgud9Nl7aOywlNrv4HG9zJy6F0kleufwnlNge30+9/LMElyYH/NRvM
nH1bCmq+wP9tf4IWZaCpSEPutNe/pYQf8paH/Lv0M5YFb2esA9LR0zgOdzg8OyHA
AcFw8ViQl/ZxexGKqCnteLPWugNLs5udS0zpIZXIajiW6tinGaRX5KoLNe+mAPvG
DOTIdL5cXfnU/rpy3TXApNIy9TS3/yZ3NgZgSydGvQyRHYCmqZPhzGi3h0u2ilS2
bDI4BHrFSQQjOzwrvnt77Tvw2I/Aq/0tvuVqyMNYz2a//avRKR1IWv5An2wihWLX
q2SS6jLpghFoNf5DY7HoUU623nCDLcYPjDR/AdmeW4+/wBKiqgY=
=ByQz
-END PGP SIGNATURE-

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



Re: Let's Encrypt with Tomcat?

2020-01-03 Thread James H. H. Lampert

On 1/3/20 9:57 AM, Christopher Schultz wrote:

Is perhaps the AWS firewall (which is a Load Balancer, right?)
redirecting the port?

Easy test (from the server):

$ telnet localhost 443


I hadn't thought of that. But alas, that instance doesn't have Telnet on it.


If it connects, you have something on the host making this work. If it
fails to connect, the 443 -> 8443 magic is outside the host itself.


If, however, I do curl https://foo.bar.net from my Mac, I get a 
response, but if I do curl https://localhost, it doesn't get anywhere.



Note that if you are using AWS load-balancer, AWS provides free
certificates that auto-renew; just configure them and you are done
forever.



Let me know about the Load-Balancer. That's probably the piece of the
puzzle you aren't looking at quite yet.


No; we *have* load-balanced clusters, and they *are* (as of last month) 
on AWS's certificate system, so I know what that looks like. This is 
completely different; when I connect, I see the certificate that is 
currently active on the Tomcat server (and if I plug a different cert 
into Tomcat, I see the change from my browser).


--
JHHL

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



JDBC connection pooling maxActive or MaxTotal

2020-01-03 Thread Dave Bothwell
Hello,

I am using Tomcat 8.5.11 with JDBC connection pooling. Based on the
documentation it is clear that DBCP pooling has changed the maxActive
attribute to maxTotal. However it is unclear, based on this document
https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html, if JDBC
pooling has also changed maxActive to maxTotal.

Also, I am currently using both attributes maxActive and maxTotal in my
current server.xml file, which does not appear to be causing any issues.

my question is which attribute should I be using?

Thanks
Dave

-- 



David Bothwell

Chairman of the Board, Chief technology Officer | Primepoint, LLC

Address: 2 Springside Road, Westampton, NJ 08060

Phone: 800-600-5257

-
-
-

- - 

-- 
This communication, and any information or attachments contained within, 
may contain privileged or confidential information that is intended for the 
sole use of the recipient or recipients named above. If the reader of this 
message is not an intended recipient, or authorized to receive such 
messages for an intended recipient, you are hereby notified that any 
review, use, dissemination, copying, or distribution of this communication, 
or any of its contents is strictly prohibited. If you have received this 
message in error, please notify us immediately of the error by return email 
and permanently remove the original message, its contents, and any copies 
from your system. Thank you.


Re: Let's Encrypt with Tomcat?

2020-01-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

James,

On 1/2/20 19:45, James H. H. Lampert wrote:
> Am I to understand that Tomcat 8.5.40 can use the ".cer,"
> ".ca.crt" and ".key" files directly, instead of the Java
> Keystore file?
> 
> On 12/30/19 1:41 PM, Peter Kreuser wrote:
>> Correct!
> 
> Great. Then if I can figure out how to get this thing
> 
> I'm studying the server under discussion, and I can't figure out
> what I did, some six months ago, to make Tomcat look like 443 to
> the outside world.
> 
> Here is what I do know: * It's an AWS EC2 instance.
> 
> * There is no load balancer involved.
> 
> * The only active connector in server.xml has it listening on 8443,
> with a proxyPort clause specifying 443.
> 
> * If I do a netstat, I find that something is indeed listening on
> 8443, but nothing is listening on 443.
> 
> * If I look at the AWS console, if there is something translating
> 443 to 8443, I can't find it.
> 
> * If I do an "iptables -L," I get only column headings.
> 
> * There are evidently two copies of Apache httpd on the box, one
> of which evidently came with the OS, and the other of which
> evidently came with the Bitnami SVN/Trac stack. Only the latter
> copy is active. It is listening on ports 81 (unsecured, but blocked
> by the firewall) and 8000 (secured).
> 
> * If I open port 81 up to my own IP (in the AWS firewall), I can
> reach the same SVN/Trac landing page on unsecured port 81 that I
> can on secured port 8000.

Is perhaps the AWS firewall (which is a Load Balancer, right?)
redirecting the port?

Easy test (from the server):

$ telnet localhost 443

If it connects, you have something on the host making this work. If it
fails to connect, the 443 -> 8443 magic is outside the host itself.

Note that if you are using AWS load-balancer, AWS provides free
certificates that auto-renew; just configure them and you are done
forever.

Also, AWS will happily connect to an EC2 server with a self-signed
certificate, so there is no need to use Let's Encrypt for your
host-specific certificates. Just generate a long-lived self-signed
certificate and you are done for a while. You are still welcome to
rotate your certs as often as you'd like. The only reason to use Let's
Encrypt is if you want OTHER clients to trust your own certificate.

> * Tomcat is running completely independently of the active httpd:
> if I shut down the active httpd, Tomcat still responds.
> 
> * I was able to find the apache VirtualHost configurations (in a
> file called bitnami.conf, naturally), and by replacing the one for
> port 81 with (and once again, domain names have been changed to
> protect the innocent):
>>  ServerName foo.bar.net Redirect
>> permanent / https://foo.bar.net:8000/ 
> the unsecured Port 81 now redirects to 80. Conversely, if I leave
> out the :8000 it redirects to the Tomcat server.
> 
> * Like a complete and utter idiot, I left no notes whatsoever about
> how I set this thing up in the first place. Probably because I
> didn't fully understand what I'd done, or how.
> 
> * Just as it was when I *was* setting this thing up in the first
> place, httpd configuration files (that can be all over the place)
> make me long for the simplicity of Tomcat configuration files.
> 
> I *think* I can *probably* get Apache (and a cron job running
> certbot) on Let's Encrypt, and Tomcat using its certs (and a cron
> job reloading them), without understanding what I'd done to get
> Tomcat showing up on 443 to the outside world, but it would be nice
> if I *did* understand what I'd done.

Let me know about the Load-Balancer. That's probably the piece of the
puzzle you aren't looking at quite yet.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4PgIEACgkQHPApP6U8
pFgvtg/8DPjUrMAsW6oreNhOK1Aj4GmKgZHUJZsW/RBkgg5CTvwiFnVAxfAF3SP6
0Lill24qp9ZGvoq3FQC9sKu68N7nQCfSbNn6D54by7YscAtAL42puUxOPXOTDlLl
sG0fHbZA6YAYuoVprpT5LuVODwSu13v9rOtCKJWZROWymKTuUf3C8oZgo2aYc/PS
FScWwcGbtPgkgO7tuOY9QsmuJMqOj73Z1lq86voU9cW0PCH8cik/Wp2iS+30XbRH
c+J+Yirie7WrDa7wVRBPm76sDGSmmyRy+DeR9dwuzFiixQOdsuP/Lsgp/2y+rc+M
VbBCiPWy/pS+kcJWP7R3JtfujgZzyyqkuTL/AlTnhW2OykNSoCzHHUgnTYcDdHps
udxUih+o5fikT5kJvxglvTECaY9QbizXN84Uy6S5rGCB2LMZtlDShTnF0cx+v2y1
zagbC1/5TDedGTCISqpCRu+RliuyvmPvUs8NoxgtIEvg5cqVOoVdaL9tLHZ+UxVC
0wLoboMdneyn0yEF5fe4ySefW7Do8pAyBNRJLpYg0wuQC3Q6j5Kv4CUAUOazrEyK
/AlxrhM3Zg82EecbjgfzNbq87vSQnQvosALCVvqcylC1TtWUaE1WWPhy+0hxo8y+
PVuw4KSg2BZnn2kCMlBLVNWOREDl8tTdZDfX7ASf8xaCdZx8LiE=
=ITNd
-END PGP SIGNATURE-

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