Re: JDBC connection pooling maxActive or MaxTotal
Hey Dave B. , My question from chris was for your benefit. default configuration is not the same thing as vendor neutral. chris wrote: > If you use both, you should be all set for whichever pool you use at runtime. DOH ! >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. YES IGNORE WARNINGS BECAUSE we have not made a word connect between generic and default and and vendor neutral and vendor specific so, the developer who wrote warning should be ignored , because he doesn't know what he is doing. but you AND chris do know by shoving two APIs down the throat our beloved poor little tomcat. >Note that you will have to specifically enable tomcat-pool, so it's unlikely that the pooling-library in use will be a surprise. HUH! If your are trying to use both APIs then you should get chris to help you. Sometimes terms such as generic and vendor neutral can be confusing. Especially when chris is saying you will get a warning not an error WHEN YOU USE BOTH. I know you think he is being helpful, but actually he has got his nickers in twist because he doesn't know what those terms mean that he is himself using either. If he did he would say to you why are you using vendor specific API and Vendor neutral API at same time on the same application server. You see what tomcat is really saying you are confused by terminology just like chris. www.backbutton.co.uk ♡۶¯\_(ツ)_/¯ ♡۶ Marriage of loose and tight coupling -> healthy applications ♡۶ Wot no -classpath --class-path even ! -cp javac Garden/Vegetables/VineVegetable.java java Garden.Vegetables.VineVegetable On Fri, 3 Jan 2020 at 23:50, zahid wrote: > 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 > >> R7GsjNel
Re: [OT] JDBC connection pooling maxActive or MaxTotal
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Zahid, On 1/3/20 18:50, zahid wrote: > Is commons-dbcp-2.x a Database pooling component for any > container Jetty,Jboss tomcat etc. ? Yes. Tomcat ships with a shaded (package-renamed) version of commons-dbcp as well as tomcat-pool, a separate connection-pool implementation. > is commons-dbcp-2.x a third option, separate option from the two > pooling options [tomcat-pool and commons-pool] you mentioned ? No, I misspoke and said commons-pool. commons-dbcp is based upon commons-pool which is a generic pooling framework. The "dbcp" flavor provides pooling (unsurprisingly) of JDBC connections. The commons-pool reference was meant to be the bundled version of commons-dbcp that Tomcat already provides. Thanks, - -chris > 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: >> > 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 >>> >>> - - >>> >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >>> -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4TWrkACgkQHPApP6U8 pFibBw/+Mpzeueng9m+w+T19rZM3TG8MCToGHY1oqzrC59p3dIogcFW8qneEQhqd +Ah3Fz7G8aclSuWdJYLoqXm3vnmyWlfUM7qlDKIVyIb1AyWfdP0OqmWU2ze4WFLn jUmwVyX4F0K0AcnzFLxfQpZHK/0LS17tgig6ZwVZW1Wwu8zULOKavfnuDTl4mMwK qqJznL3wMLvU2mTWlWEKWIhCusLi2xmHWTh/rT0hl4r+WqhRDVyFEzC4Yl1XJTFJ IvyZcvSYPpHfvqg5OR15SlOwJbGxIhn1lyP5KrjciIy6zir4MdFp/8WsCKPF9MBW 7vxXf1fzoahGWkmbo6hgfpWnw7jOjq+bvAFGp6k287dXpJO6duIvqkIjfosZUTsU 0MoWtug3CTWz0E5bYLDZ4zo7+qyFVYzccUcSdXtjwUOmg+ln0VzXbPxpCB62Fk+/ SK7/ukHC9Ovy3upf5aMLSNDCDrl1/3I0tSuXz1lfObxqto0HZH3gho4mzKt1vnVc iECw0NBGD53lBC5FQ/KuUgn24DGgQlrU171KQV8h/YGrdj+PxYKDwsAdP7i00bzg 7upQ2oMdG4tzsFI7kXD178bVZgqUHLJ+1j5yI0nFGx3cRc47K79IRQj5Sxp4gw0W /0iRr9zhRWWvKsvICNyU86o269gPAuHbc1bGLOtV26DoKORaH1g= =RY/K -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
On Sat, Jan 4, 2020 at 2:47 AM 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. > > You can also have your own connection pooling from your application. But of course JNDI has advantage that it is decoupled and container supplies the connection. > 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 > > -- > > <https://www.primepoint.com/> > > David Bothwell > > Chairman of the Board, Chief technology Officer | Primepoint, LLC > > Address: 2 Springside Road, Westampton, NJ 08060 > > Phone: 800-600-5257 > > <https://www.primepoint.com/>- > <https://www.facebook.com/Primepoint.Payroll.HR/>- > <https://www.instagram.com/primepointllc/>- > < > https://www.linkedin.com/company/505608?trk=tyah=clickedVertical%3Acompany%2CclickedEntityId%3A505608%2Cidx%3A2-2-3%2CtarId%3A1447790586761%2Ctas%3Aprimepoint > > > - <https://twitter.com/primepoint>- <https://vimeo.com/user55649759> > > -- > 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. > -- I love Java <https://javadevnotes.com/java-integer-to-string-examples>
Re: JDBC connection pooling maxActive or MaxTotal
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
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 > > -- <https://www.primepoint.com/> David Bothwell Chairman of the Board, Chief technology Officer | Primepoint, LLC Address: 2 Springside Road, Westampton, NJ 08060 Phone: 800-600-5257 <https://www.primepoint.com/>- <https://www.facebook.com/Primepoint.Payroll.HR/>- <https://www.instagram.com/primepointllc/>- <https://www.linkedin.com/company/505608?trk=tyah=clickedVertical%3Acompany%2CclickedEntityId%3A505608%2Cidx%3A2-2-3%2CtarId%3A1447790586761%2Ctas%3Aprimepoint> - <https://twitter.com/primepoint>- <https://vimeo.com/user55649759> -- 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
-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
|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.
JDBC connection pooling maxActive or MaxTotal
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 -- <https://www.primepoint.com/> David Bothwell Chairman of the Board, Chief technology Officer | Primepoint, LLC Address: 2 Springside Road, Westampton, NJ 08060 Phone: 800-600-5257 <https://www.primepoint.com/>- <https://www.facebook.com/Primepoint.Payroll.HR/>- <https://www.instagram.com/primepointllc/>- <https://www.linkedin.com/company/505608?trk=tyah=clickedVertical%3Acompany%2CclickedEntityId%3A505608%2Cidx%3A2-2-3%2CtarId%3A1447790586761%2Ctas%3Aprimepoint> - <https://twitter.com/primepoint>- <https://vimeo.com/user55649759> -- 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
Am 22.01.2016 um 12:35 schrieb R. Sriram: Hello I am trying to establish connection pooling. Should I be using dbcp? If you want to use db connection pooling, it is probably a good idea to use the pooling method the container gives you, as it will be used by a lot of people and therefore has gotten a lot of testing. In the case of tomcat that would be a copy of commons dbcp(2). Regards, Felix - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
JDBC Connection pooling
Hello I am trying to establish connection pooling. Should I be using dbcp? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Resource JDBC connection pooling USING LDAP
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim, On 2/17/2009 10:46 AM, trames wrote: Thanks, that is exactly what I did. Since the documentation stated that it used apache (tomcat's version) dbcp and the BasicDataSourceFactory, I looked at the source for this class through SVN. It fairly simply creates a BasicDataSource. So that is what I did. I retrieved all the parameters from LDAP within my factory class. Worked out great. Would you be willing to post your implementation into the Tomcat wiki? This seems like something someone may either want to use directly (unlikely IMO) or as a jumping-off point for developing their own ResourceFactory. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmcWaEACgkQ9CaO5/Lv0PBSEACdFVAp1J+8xdpat2BQA+a8ql6/ a5IAn2MsH5/QVzsiXL3m/5LqLoj4Dugj =MOsW -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Resource JDBC connection pooling USING LDAP
Thanks, that is exactly what I did. Since the documentation stated that it used apache (tomcat's version) dbcp and the BasicDataSourceFactory, I looked at the source for this class through SVN. It fairly simply creates a BasicDataSource. So that is what I did. I retrieved all the parameters from LDAP within my factory class. Worked out great. Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim, On 2/13/2009 5:02 PM, trames wrote: My goal is to NOT embed the database connection user name, password, or even server url like it is shown below. I have the ApacheDS LDAP server set up, and would like to retrieve the credentials/server from that. I don't believe Tomcat has anything built-in that can do that. Is there a way to get the entire URL string from LDAP? Is there some other way to do what I would like to do? Would I have to write my own Resource Factory? I believe you will have to write your own ResourceFactory. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmZ3mQACgkQ9CaO5/Lv0PD8lQCfYaV1e3nw9xyOqxm4KGtW9/RP f6sAn35DIZ54DC5li+bnxCowMufIeHLW =mRq5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Resource-JDBC-connection-pooling-USING-LDAP-tp22005711p22059917.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Resource JDBC connection pooling USING LDAP
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim, On 2/13/2009 5:02 PM, trames wrote: My goal is to NOT embed the database connection user name, password, or even server url like it is shown below. I have the ApacheDS LDAP server set up, and would like to retrieve the credentials/server from that. I don't believe Tomcat has anything built-in that can do that. Is there a way to get the entire URL string from LDAP? Is there some other way to do what I would like to do? Would I have to write my own Resource Factory? I believe you will have to write your own ResourceFactory. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmZ3mQACgkQ9CaO5/Lv0PD8lQCfYaV1e3nw9xyOqxm4KGtW9/RP f6sAn35DIZ54DC5li+bnxCowMufIeHLW =mRq5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Resource JDBC connection pooling USING LDAP
I have found lot of examples on how to set up JDBC connection pooling using the resource tags in context.xml. My goal is to NOT embed the database connection user name, password, or even server url like it is shown below. I have the ApacheDS LDAP server set up, and would like to retrieve the credentials/server from that. Is there a way to get the entire URL string from LDAP? Is there some other way to do what I would like to do? Would I have to write my own Resource Factory? Resource name=jdbc/facdir auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 validationQuery=Select 1 testOnBorrow=true timeBetweenEvictionRunsMillis=6 minEvictableIdleTimeMillis=6 driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver url=jdbc:sqlserver://MYSERVER\\INSTANCE;DatabaseName=MYDBNAME;User=auser;Password=apassword;selectMethod=direct / -- View this message in context: http://www.nabble.com/Resource-JDBC-connection-pooling-USING-LDAP-tp22005711p22005711.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: jdbc connection pooling
I'm using the connection pooling on Tomcat 6. And in my case i had to put the jar from the jdbc driver on. $CATALINA_HOME/lib On Jan 4, 2008 2:05 PM, Scott McClanahan [EMAIL PROTECTED] wrote: We are about to start testing the jdbc connection pooling capabilities within tomcat. I don't have any control over the application instead perform only administrative duties. Between the developers and myself we have done a good bit of research and mapped out a decent plan but there is one unresolved dispute between us. The developer says that the jar file containing the database driver should be published within the web applications WEB-INF/lib folder while I say it should be in $CATALINA_HOME/common/lib. Who is right and why? We hoped to define the datasource as a Resource within a DefaultContext element in the server.xml so it is available to all web applications. Is this good practice? I'd like to know of some ways you folks have done it too if you've got the time. Also any gotchas to look out for with connection pooling would be helpful from those who have actually done it. Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Diego
Re: jdbc connection pooling
As you've described it using tomcat's JNDI resources, the driver has to be in common/lib. If the application defines and manages it's own pool separate from tomcat, then you could put it in the app's WEB-INF/lib folder. This has everything to do with how the classloaders work. Since tomcat and your webapp both have to have access to the driver when using container managed connection pools, it has to be in common/lib. --David Scott McClanahan wrote: We are about to start testing the jdbc connection pooling capabilities within tomcat. I don't have any control over the application instead perform only administrative duties. Between the developers and myself we have done a good bit of research and mapped out a decent plan but there is one unresolved dispute between us. The developer says that the jar file containing the database driver should be published within the web applications WEB-INF/lib folder while I say it should be in $CATALINA_HOME/common/lib. Who is right and why? We hoped to define the datasource as a Resource within a DefaultContext element in the server.xml so it is available to all web applications. Is this good practice? I'd like to know of some ways you folks have done it too if you've got the time. Also any gotchas to look out for with connection pooling would be helpful from those who have actually done it. Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jdbc connection pooling
From: Scott McClanahan [mailto:[EMAIL PROTECTED] Subject: jdbc connection pooling The developer says that the jar file containing the database driver should be published within the web applications WEB-INF/lib folder while I say it should be in $CATALINA_HOME/common/lib. You are correct, the developer is wrong. If Tomcat is to manage the connections, its internal classes must be able to see the JDBC driver classes. Look at the classloader hierarchy. Note that Tomcat 5.0.x is deprecated; you should be using a newer level. We hoped to define the datasource as a Resource within a DefaultContext element in the server.xml so it is available to all web applications. This is not unusual, although DefaultContext is not used in 5.5 and beyond; there's a context.xml file in the conf directory instead. Also any gotchas to look out for with connection pooling would be helpful from those who have actually done it. Make sure the webapp code includes finally clauses on all DB access to make sure the connections are logically closed and thereby returned to the pool. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jdbc connection pooling
On Fri, 2008-01-04 at 10:23 -0600, Caldarale, Charles R wrote: From: Scott McClanahan [mailto:[EMAIL PROTECTED] Subject: jdbc connection pooling The developer says that the jar file containing the database driver should be published within the web applications WEB-INF/lib folder while I say it should be in $CATALINA_HOME/common/lib. You are correct, the developer is wrong. If Tomcat is to manage the connections, its internal classes must be able to see the JDBC driver classes. Look at the classloader hierarchy. Note that Tomcat 5.0.x is deprecated; you should be using a newer level. We hoped to define the datasource as a Resource within a DefaultContext element in the server.xml so it is available to all web applications. This is not unusual, although DefaultContext is not used in 5.5 and beyond; there's a context.xml file in the conf directory instead. Also any gotchas to look out for with connection pooling would be helpful from those who have actually done it. Make sure the webapp code includes finally clauses on all DB access to make sure the connections are logically closed and thereby returned to the pool. - Chuck I'm going to try my best to not sound ignorant but can you better explain what you mean when you say tomcat manages the connections compared to if the application (using the same apache commons projects) were to manage the connections. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jdbc connection pooling
We are about to start testing the jdbc connection pooling capabilities within tomcat. I don't have any control over the application instead perform only administrative duties. Between the developers and myself we have done a good bit of research and mapped out a decent plan but there is one unresolved dispute between us. The developer says that the jar file containing the database driver should be published within the web applications WEB-INF/lib folder while I say it should be in $CATALINA_HOME/common/lib. Who is right and why? We hoped to define the datasource as a Resource within a DefaultContext element in the server.xml so it is available to all web applications. Is this good practice? I'd like to know of some ways you folks have done it too if you've got the time. Also any gotchas to look out for with connection pooling would be helpful from those who have actually done it. Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jdbc connection pooling
On Fri, 2008-01-04 at 14:12 -0200, Diego wrote: I'm using the connection pooling on Tomcat 6. And in my case i had to put the jar from the jdbc driver on. $CATALINA_HOME/lib On Jan 4, 2008 2:05 PM, Scott McClanahan [EMAIL PROTECTED] wrote: We are about to start testing the jdbc connection pooling capabilities within tomcat. I don't have any control over the application instead perform only administrative duties. Between the developers and myself we have done a good bit of research and mapped out a decent plan but there is one unresolved dispute between us. The developer says that the jar file containing the database driver should be published within the web applications WEB-INF/lib folder while I say it should be in $CATALINA_HOME/common/lib. Who is right and why? We hoped to define the datasource as a Resource within a DefaultContext element in the server.xml so it is available to all web applications. Is this good practice? I'd like to know of some ways you folks have done it too if you've got the time. Also any gotchas to look out for with connection pooling would be helpful from those who have actually done it. Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] My apologies, we are running tomcat 5.0.28 on linux. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jdbc connection pooling
From: Scott McClanahan [mailto:[EMAIL PROTECTED] Subject: RE: jdbc connection pooling I'm going to try my best to not sound ignorant but can you better explain what you mean when you say tomcat manages the connections compared to if the application (using the same apache commons projects) were to manage the connections. Functionally no significant differences, other than having Tomcat manage them allows them to be shared across multiple webapps. Since the connection pooling logic is already included with Tomcat (and pretty much every other app server), there's no reason to carry that around in your webapp. If you want to have pooled connections private to a particular webapp, then placing the driver and various commons jars in WEB-INF/lib would be appropriate. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jdbc connection pooling
On Fri, 2008-01-04 at 11:16 -0600, Caldarale, Charles R wrote: From: Scott McClanahan [mailto:[EMAIL PROTECTED] Subject: RE: jdbc connection pooling I'm going to try my best to not sound ignorant but can you better explain what you mean when you say tomcat manages the connections compared to if the application (using the same apache commons projects) were to manage the connections. Functionally no significant differences, other than having Tomcat manage them allows them to be shared across multiple webapps. Since the connection pooling logic is already included with Tomcat (and pretty much every other app server), there's no reason to carry that around in your webapp. If you want to have pooled connections private to a particular webapp, then placing the driver and various commons jars in WEB-INF/lib would be appropriate. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks Chuck. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jdbc connection pooling
NOT in the WEB-INF/lib -- put in the common/lib - that's where it goes. You might get very erratic performance putting the jar file in both places. make sure you know how to configure either your server.xml file or respective META-INF/ .xml file appropriately. Depends on which TC version you use. -Original Message- From: Scott McClanahan [mailto:[EMAIL PROTECTED] Sent: Friday, January 04, 2008 10:05 AM To: Tomcat Users List Subject: jdbc connection pooling We are about to start testing the jdbc connection pooling capabilities within tomcat. I don't have any control over the application instead perform only administrative duties. Between the developers and myself we have done a good bit of research and mapped out a decent plan but there is one unresolved dispute between us. The developer says that the jar file containing the database driver should be published within the web applications WEB-INF/lib folder while I say it should be in $CATALINA_HOME/common/lib. Who is right and why? We hoped to define the datasource as a Resource within a DefaultContext element in the server.xml so it is available to all web applications. Is this good practice? I'd like to know of some ways you folks have done it too if you've got the time. Also any gotchas to look out for with connection pooling would be helpful from those who have actually done it. Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JDBC connection pooling problem
Hi all, I have a problem with connection pooling. Example: - about 30 applications using the pool - each application uses 1 DB username/password (30 users) imagine following situation: Only 1 application works hard, the others do nothing. This application takes for example 80% of all possible connections to the DB, store them in a pool and reuses them too often. The other 29 applications become fully loaded BUT they have only 20% of resources (possible connections) together, becouse the first application still holds and reuses the 80% of connections. Is there any way how to manage this problem, so that all applications have the same amount of resources when they all are fully loaded ? To tell JDBC pool that every DB user (application) can use only 1/30 of possible connections doesn't resolve the problem, because when only one application is working, it's using only 1/30 of possible connections even if the other 29/30 are free to use. thanks in advance Michal, Bno - Czech Republic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDBC connection pooling problem
This sounds like poor coding to me. Your application should get the connection object from the pool and immediately release when done. Having an application hold onto a connection (especially in client/server) world is bound to cause you to run out of connections or reach timeouts. On 5/2/06, Michal Fleischhans [EMAIL PROTECTED] wrote: Hi all, I have a problem with connection pooling. Example: - about 30 applications using the pool - each application uses 1 DB username/password (30 users) imagine following situation: Only 1 application works hard, the others do nothing. This application takes for example 80% of all possible connections to the DB, store them in a pool and reuses them too often. The other 29 applications become fully loaded BUT they have only 20% of resources (possible connections) together, becouse the first application still holds and reuses the 80% of connections. Is there any way how to manage this problem, so that all applications have the same amount of resources when they all are fully loaded ? To tell JDBC pool that every DB user (application) can use only 1/30 of possible connections doesn't resolve the problem, because when only one application is working, it's using only 1/30 of possible connections even if the other 29/30 are free to use. thanks in advance Michal, Bno - Czech Republic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow
Re: JDBC connection pooling problem
You're absolutelly right Marc, but the connection is being described by the connection context containing the username and the password. Each application has its own DB account, so as you have written bellow, the application gives the connection back to the pool BUT only the same application can reuse it again, becouse the other ones use different accounts, so different connection contexts Quoting Marc Farrow [EMAIL PROTECTED]: This sounds like poor coding to me. Your application should get the connection object from the pool and immediately release when done. Having an application hold onto a connection (especially in client/server) world is bound to cause you to run out of connections or reach timeouts. On 5/2/06, Michal Fleischhans [EMAIL PROTECTED] wrote: Hi all, I have a problem with connection pooling. Example: - about 30 applications using the pool - each application uses 1 DB username/password (30 users) imagine following situation: Only 1 application works hard, the others do nothing. This application takes for example 80% of all possible connections to the DB, store them in a pool and reuses them too often. The other 29 applications become fully loaded BUT they have only 20% of resources (possible connections) together, becouse the first application still holds and reuses the 80% of connections. Is there any way how to manage this problem, so that all applications have the same amount of resources when they all are fully loaded ? To tell JDBC pool that every DB user (application) can use only 1/30 of possible connections doesn't resolve the problem, because when only one application is working, it's using only 1/30 of possible connections even if the other 29/30 are free to use. thanks in advance Michal, Bno - Czech Republic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow Michal Fleischhans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]