You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by הילה <hi...@gmail.com> on 2011/04/05 15:31:36 UTC

JDBC Pool Disconnections

Hey,

I have lately (with your help) switched the pool that tomcat uses , from the
basic pool to the JDBC pool, with these actions-
1. under <resource> tag in xml configuration
[conf/catalina/localhost/Appname.xml] I specified the factory name, as you
can see below-

name="jdbc/com/vstechnology/appname
scope="Shareable"
type="javax.sql.Datasource"
url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
maxActive="200"
minIdle="0"
maxIdle="10"
maxWait="10000"
initialSize="20"
driverClassName="net.sourceforge.jtds.jdbc.Driver"

[no need to mention user and password, since I use windows authentication -
for those of you who remember my thread a couple of weeks ago]

2. put the tomcat-jdbc.jar file in lib folder of tomcat, not lib folder
under webapps/appname/WEB-INF. correct me if it needs to be there as well
(it works without it so far).


Since then, we experience disconnections of client to app server, that occur
becuase of app servers-DB disconnections.
These errors appear in the logs (not together, i've collected them)-

* ERROR, hibernate.transaction.JDBCTransaction JDBC begin failed
javasql.SQLException: Invalid state, the Connection object is closed.

* org.hibernate.util.JDBCExceptionReporter , Timeout: Pool empty. Unable to
fetch a connection in 10 seconds, none available[0 in use]

* WARN, hibernate.util.JDBCExceptionReporter SQL Error: 0, SQLState: 08S01
ERROR, hibernate.util.JDBCExceptionReporter I/O Error: DB server closed
connection.
ERROR,  error processing request:   exception.*appname*Error:
.hibernate.exception.JDBCConnectionException: Cannot open connection


Our DBA guys looked at the SQL server logs and monitoring system, and
haven't found any issues
Network also looked at it and says that everything is ok on their side,
which leads me to believe that there's a problem with the JDBC pool, or
something else regarding the connection to DB.

It happens mainly under load, but not just under load.

do you know these errors I got in logs? does somebody have any idea how to
solve it and stop the disconnections?

Thanks
Hila

Re: JDBC Pool Disconnections

Posted by הילה <hi...@gmail.com>.
I think that if the disconnections will continue, I'll read just about
anything to make it stop :]
Thanks ;)


2011/4/8 Christopher Schultz <ch...@christopherschultz.net>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> הילה,
>
> On 4/8/2011 11:04 AM, הילה wrote:
> > so.. SQL server 2008 is the one I'm using. :]
>
> Some quick Googling didn't lead me to any resources on a fast "ping"
> that you could use as a validation query. You could always read the
> documentation for your JDBC driver. That's how I found out about MySQL's
> "ping" feature.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk2fK1oACgkQ9CaO5/Lv0PB9iQCdFX/KYzRCjGlWbxRvPXC5Ko3y
> gpsAoJEGkGgg0nedFZiAAD2RET1N8nyy
> =nhC8
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: JDBC Pool Disconnections

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

הילה,

On 4/8/2011 11:04 AM, הילה wrote:
> so.. SQL server 2008 is the one I'm using. :]

Some quick Googling didn't lead me to any resources on a fast "ping"
that you could use as a validation query. You could always read the
documentation for your JDBC driver. That's how I found out about MySQL's
"ping" feature.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2fK1oACgkQ9CaO5/Lv0PB9iQCdFX/KYzRCjGlWbxRvPXC5Ko3y
gpsAoJEGkGgg0nedFZiAAD2RET1N8nyy
=nhC8
-----END PGP SIGNATURE-----

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


Re: JDBC Pool Disconnections

Posted by הילה <hi...@gmail.com>.
Thanks
so.. SQL server 2008 is the one I'm using. :]


2011/4/8 Caldarale, Charles R <Ch...@unisys.com>

> > From: הילה [mailto:hilavalensia@gmail.com]
> > Subject: Re: JDBC Pool Disconnections
>
> > go back for a sec..
> > last thing we talked about is adding the strings of validation query,
> > validation interval and test on borrow, so the pool will know if the
> > connections had been closed by DB or not, and respond accordingly. this
> one
> > I understood :]
> > so.. RDBMS? how is it connected to my case? (bare with me.. I was
> introduced
> > to tomcat only a couple months ago).
>
> A) Ignore anything Martin G posts - so much of it is irrelevant that it's a
> waste of time to wade through it.
>
> B) RDBMS = DB.  The one you're using may have an extremely fast mechanism
> that can be used to determine the viability of the connection with minimal
> overhead.  MySQL is the example cited by Chris S.
>
>  - 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.
>
>
>

RE: JDBC Pool Disconnections

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: הילה [mailto:hilavalensia@gmail.com] 
> Subject: Re: JDBC Pool Disconnections

> go back for a sec..
> last thing we talked about is adding the strings of validation query,
> validation interval and test on borrow, so the pool will know if the
> connections had been closed by DB or not, and respond accordingly. this one
> I understood :]
> so.. RDBMS? how is it connected to my case? (bare with me.. I was introduced
> to tomcat only a couple months ago).

A) Ignore anything Martin G posts - so much of it is irrelevant that it's a waste of time to wade through it.

B) RDBMS = DB.  The one you're using may have an extremely fast mechanism that can be used to determine the viability of the connection with minimal overhead.  MySQL is the example cited by Chris S.

 - 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.



Re: JDBC Pool Disconnections

Posted by הילה <hi...@gmail.com>.
go back for a sec..
last thing we talked about is adding the strings of validation query,
validation interval and test on borrow, so the pool will know if the
connections had been closed by DB or not, and respond accordingly. this one
I understood :]
so.. RDBMS? how is it connected to my case? (bare with me.. I was introduced
to tomcat only a couple months ago).

Thanks
Hila


2011/4/8 Martin Gainty <mg...@hotmail.com>

>
> Relational Database Management System
>
> If you desire to implement a tag library which maps data entities into jsp
> tag elements I would suggest Phillipe Poulards 'Active Tag'
> http://ns.inria.fr/active-tags/rdbms/rdbms.html#N4000C7
>
> Bon Chance!
> Martin
> ______________________________________________
> Note de déni et de confidentialité
>  Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
>
>
> > From: hilavalensia@gmail.com
> > Date: Fri, 8 Apr 2011 13:14:43 +0300
> > Subject: Re: JDBC Pool Disconnections
> > To: users@tomcat.apache.org
> >
> > What is RDBMS? I tried to google it, but haven't quite figure it out.
> > as mentioned, we're using SQL server 2008, latest SP.
> >
> > And I will add the strings of validationQuery and validationInterval. :]
> >
> > Thanks
> > Hila
> >
> >
> > 2011/4/7 Christopher Schultz <ch...@christopherschultz.net>
> >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > הילה,
> > >
> > > On 4/6/2011 3:36 PM, הילה wrote:
> > > > I wanted to add it, bu the company that developed the application
> > > > that runs on the tomcat, says that it affect performance and has
> > > > issues.
> > >
> > > What is your RDBMS? If it happens to be MySQL, I know that they support
> > > a "ping" query that is very fast. It's much better and faster than
> > > spewing SQLExceptions into your log file.
> > >
> > > I would always recommend running with a validationQuery enabled, even
> if
> > > you have to set a validation interval to reduce the number of
> > > validations that actually occur.
> > >
> > > - -chris
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.10 (MingW32)
> > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> > >
> > > iEYEARECAAYFAk2c3tkACgkQ9CaO5/Lv0PBGyACgu1jH9svX+SbIU4ZrvUG63VRD
> > > FnUAoLMOBchXqMmyQRJUHD/G3Dc4ijDP
> > > =vpTh
> > > -----END PGP SIGNATURE-----
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
>
>

RE: JDBC Pool Disconnections

Posted by Martin Gainty <mg...@hotmail.com>.
Relational Database Management System

If you desire to implement a tag library which maps data entities into jsp tag elements I would suggest Phillipe Poulards 'Active Tag'
http://ns.inria.fr/active-tags/rdbms/rdbms.html#N4000C7

Bon Chance!
Martin  
______________________________________________ 
Note de déni et de confidentialité
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> From: hilavalensia@gmail.com
> Date: Fri, 8 Apr 2011 13:14:43 +0300
> Subject: Re: JDBC Pool Disconnections
> To: users@tomcat.apache.org
> 
> What is RDBMS? I tried to google it, but haven't quite figure it out.
> as mentioned, we're using SQL server 2008, latest SP.
> 
> And I will add the strings of validationQuery and validationInterval. :]
> 
> Thanks
> Hila
> 
> 
> 2011/4/7 Christopher Schultz <ch...@christopherschultz.net>
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > הילה,
> >
> > On 4/6/2011 3:36 PM, הילה wrote:
> > > I wanted to add it, bu the company that developed the application
> > > that runs on the tomcat, says that it affect performance and has
> > > issues.
> >
> > What is your RDBMS? If it happens to be MySQL, I know that they support
> > a "ping" query that is very fast. It's much better and faster than
> > spewing SQLExceptions into your log file.
> >
> > I would always recommend running with a validationQuery enabled, even if
> > you have to set a validation interval to reduce the number of
> > validations that actually occur.
> >
> > - -chris
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.10 (MingW32)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> >
> > iEYEARECAAYFAk2c3tkACgkQ9CaO5/Lv0PBGyACgu1jH9svX+SbIU4ZrvUG63VRD
> > FnUAoLMOBchXqMmyQRJUHD/G3Dc4ijDP
> > =vpTh
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
 		 	   		  

Re: JDBC Pool Disconnections

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

André,

On 4/8/2011 7:33 AM, André Warnier wrote:
> הילה wrote:
>> What is RDBMS? 
> 
> An easy one, just my level :
> Relational DataBase Management System.
> 
> As a further exercise, here is a list of essential acronyms which one is
> supposed to know in order to be recognised as a Real Tomcat Programmer
> (RTP) : JVM, J2EE, BIO, NIO, APR, JDBC, JMX, JNDI, CO2, HTTP, JSP,
> HTTPS, SSL, LOG4J, SSH, GC, UTF-8, JINI, SPNEGO, WWW, HTML, XML, AJP,
> OOM, CNFE, YMMV, AFAIK, REST, SOAP, HTMLX, SMTP, W3C, ASF, CGI, NoSQL,
> API, WAR, JAR, AAA.

You forgot WTF, and my favorite variation, OMGWTFBBQ.

> Trick question : one of the above is an intrus, is not mentioned
> anywhere in the Tomcat online documentation, and has arguably nothing to
> do at all with Tomcat or this support list. Which one ?

RTP ;)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2fH1kACgkQ9CaO5/Lv0PC/gQCgwuRqes7LO0pg13OG3SAvrP7m
ADQAnRTkb3afuw2WFk5TiiuBjGv1neml
=2ROU
-----END PGP SIGNATURE-----

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


Re: JDBC Pool Disconnections

Posted by André Warnier <aw...@ice-sa.com>.
הילה wrote:
> What is RDBMS? 

An easy one, just my level :
Relational DataBase Management System.

As a further exercise, here is a list of essential acronyms which one is supposed to know 
in order to be recognised as a Real Tomcat Programmer (RTP) : JVM, J2EE, BIO, NIO, APR, 
JDBC, JMX, JNDI, CO2, HTTP, JSP, HTTPS, SSL, LOG4J, SSH, GC, UTF-8, JINI, SPNEGO, WWW, 
HTML, XML, AJP, OOM, CNFE, YMMV, AFAIK, REST, SOAP, HTMLX, SMTP, W3C, ASF, CGI, NoSQL, 
API, WAR, JAR, AAA.

Trick question : one of the above is an intrus, is not mentioned anywhere in the Tomcat 
online documentation, and has arguably nothing to do at all with Tomcat or this support 
list. Which one ?




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


Re: JDBC Pool Disconnections

Posted by הילה <hi...@gmail.com>.
What is RDBMS? I tried to google it, but haven't quite figure it out.
as mentioned, we're using SQL server 2008, latest SP.

And I will add the strings of validationQuery and validationInterval. :]

Thanks
Hila


2011/4/7 Christopher Schultz <ch...@christopherschultz.net>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> הילה,
>
> On 4/6/2011 3:36 PM, הילה wrote:
> > I wanted to add it, bu the company that developed the application
> > that runs on the tomcat, says that it affect performance and has
> > issues.
>
> What is your RDBMS? If it happens to be MySQL, I know that they support
> a "ping" query that is very fast. It's much better and faster than
> spewing SQLExceptions into your log file.
>
> I would always recommend running with a validationQuery enabled, even if
> you have to set a validation interval to reduce the number of
> validations that actually occur.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk2c3tkACgkQ9CaO5/Lv0PBGyACgu1jH9svX+SbIU4ZrvUG63VRD
> FnUAoLMOBchXqMmyQRJUHD/G3Dc4ijDP
> =vpTh
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: JDBC Pool Disconnections

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

הילה,

On 4/6/2011 3:36 PM, הילה wrote:
> I wanted to add it, bu the company that developed the application
> that runs on the tomcat, says that it affect performance and has
> issues.

What is your RDBMS? If it happens to be MySQL, I know that they support
a "ping" query that is very fast. It's much better and faster than
spewing SQLExceptions into your log file.

I would always recommend running with a validationQuery enabled, even if
you have to set a validation interval to reduce the number of
validations that actually occur.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2c3tkACgkQ9CaO5/Lv0PBGyACgu1jH9svX+SbIU4ZrvUG63VRD
FnUAoLMOBchXqMmyQRJUHD/G3Dc4ijDP
=vpTh
-----END PGP SIGNATURE-----

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


Re: JDBC Pool Disconnections

Posted by הילה <hi...@gmail.com>.
Got it. Thanks
any other suggestions will be great (i'll add these string in a few days)


2011/4/6 Filip Hanik - Dev Lists <de...@hanik.com>

> On 4/6/2011 1:54 PM, הילה wrote:
>
>> I wanted to add the last string as well, but they said to forget about
>> it..
>>
>> :] and they should know best
>> however, if disconnections will continue (there are some right now) I'll
>> try
>> it anyway
>>
>> as for the connection validation = you said that if the DB closes a
>> connection (why does it happen? can I prevent it?)
>>
> most common is that the DB times out an idle connection. A pool holds a
> connection open, the connection is not being used and the DB times it out.
> there are many examples, same thing if there is a network glitch, or the db
> is restarted.
>
>
>
>  than the pool is checking
>> if the connection is open and working. and if not? i the DB closed the
>> connection and it's not usable.. then what does the pool do?
>>
> if the pool doesn't check, then it doesn't do anything.
> if the pool check (testOnBorrow=true) and the test fails, it closes the old
> connection and opens a new one.
>
> Filip
>
>
>> 2011/4/6 Filip Hanik - Dev Lists<de...@hanik.com>
>>
>>  validate == connection is open and working
>>>
>>> if they are worried about performance, there is a compromise that gets
>>> you
>>> best of both worlds
>>>
>>>
>>> testOnBorrow="true"
>>> validationQuery="select 1"
>>> validationInterval="30000"
>>>
>>> this ensures that in a high concurrency environment, the number of
>>> validations are limited
>>>
>>> Filip****
>>>
>>>
>>>
>>>
>>> On 4/6/2011 1:36 PM, הילה wrote:
>>>
>>>  I wanted to add it, bu the company that developed the application that
>>>> runs
>>>>
>>>> on the tomcat, says that it affect performance and has issues.
>>>>
>>>> what do you mean "validates it"? what does it do, exactly?
>>>>
>>>> Thanks
>>>> Hila
>>>>
>>>>
>>>> 2011/4/6 Filip Hanik - Dev Lists<de...@hanik.com>
>>>>
>>>>  On 4/5/2011 7:31 AM, הילה wrote:
>>>>
>>>>>  name="jdbc/com/vstechnology/appname
>>>>>
>>>>>> scope="Shareable"
>>>>>> type="javax.sql.Datasource"
>>>>>>
>>>>>>
>>>>>>
>>>>>> url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
>>>>>> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>>>>>> maxActive="200"
>>>>>> minIdle="0"
>>>>>> maxIdle="10"
>>>>>> maxWait="10000"
>>>>>> initialSize="20"
>>>>>> driverClassName="net.sourceforge.jtds.jdbc.Driver"
>>>>>>
>>>>>>  Add in
>>>>>>
>>>>> testOnBorrow="true"
>>>>> validationQuery="select 1"
>>>>>
>>>>> this ensures that if the DB closes a connection, the pool validates it
>>>>>
>>>>> best
>>>>> Filip
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>>>  -----
>>>> No virus found in this message.
>>>> Checked by AVG - www.avg.com
>>>> Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11
>>>>
>>>>
>>>>  ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: JDBC Pool Disconnections

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
On 4/6/2011 1:54 PM, הילה wrote:
> I wanted to add the last string as well, but they said to forget about it..
>
> :] and they should know best
> however, if disconnections will continue (there are some right now) I'll try
> it anyway
>
> as for the connection validation = you said that if the DB closes a
> connection (why does it happen? can I prevent it?)
most common is that the DB times out an idle connection. A pool holds a connection open, the connection is not being used and the DB times 
it out. there are many examples, same thing if there is a network glitch, or the db is restarted.


> than the pool is checking
> if the connection is open and working. and if not? i the DB closed the
> connection and it's not usable.. then what does the pool do?
if the pool doesn't check, then it doesn't do anything.
if the pool check (testOnBorrow=true) and the test fails, it closes the old connection and opens a new one.

Filip
>
> 2011/4/6 Filip Hanik - Dev Lists<de...@hanik.com>
>
>> validate == connection is open and working
>>
>> if they are worried about performance, there is a compromise that gets you
>> best of both worlds
>>
>>
>> testOnBorrow="true"
>> validationQuery="select 1"
>> validationInterval="30000"
>>
>> this ensures that in a high concurrency environment, the number of
>> validations are limited
>>
>> Filip****
>>
>>
>>
>>
>> On 4/6/2011 1:36 PM, הילה wrote:
>>
>>> I wanted to add it, bu the company that developed the application that
>>> runs
>>>
>>> on the tomcat, says that it affect performance and has issues.
>>>
>>> what do you mean "validates it"? what does it do, exactly?
>>>
>>> Thanks
>>> Hila
>>>
>>>
>>> 2011/4/6 Filip Hanik - Dev Lists<de...@hanik.com>
>>>
>>>   On 4/5/2011 7:31 AM, הילה wrote:
>>>>   name="jdbc/com/vstechnology/appname
>>>>> scope="Shareable"
>>>>> type="javax.sql.Datasource"
>>>>>
>>>>>
>>>>> url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
>>>>> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>>>>> maxActive="200"
>>>>> minIdle="0"
>>>>> maxIdle="10"
>>>>> maxWait="10000"
>>>>> initialSize="20"
>>>>> driverClassName="net.sourceforge.jtds.jdbc.Driver"
>>>>>
>>>>>   Add in
>>>> testOnBorrow="true"
>>>> validationQuery="select 1"
>>>>
>>>> this ensures that if the DB closes a connection, the pool validates it
>>>>
>>>> best
>>>> Filip
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>> -----
>>> No virus found in this message.
>>> Checked by AVG - www.avg.com
>>> Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11
>


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


Re: JDBC Pool Disconnections

Posted by הילה <hi...@gmail.com>.
I wanted to add the last string as well, but they said to forget about it..
:] and they should know best
however, if disconnections will continue (there are some right now) I'll try
it anyway

as for the connection validation = you said that if the DB closes a
connection (why does it happen? can I prevent it?) than the pool is checking
if the connection is open and working. and if not? i the DB closed the
connection and it's not usable.. then what does the pool do?


2011/4/6 Filip Hanik - Dev Lists <de...@hanik.com>

> validate == connection is open and working
>
> if they are worried about performance, there is a compromise that gets you
> best of both worlds
>
>
> testOnBorrow="true"
> validationQuery="select 1"
> validationInterval="30000"
>
> this ensures that in a high concurrency environment, the number of
> validations are limited
>
> Filip****
>
>
>
>
> On 4/6/2011 1:36 PM, הילה wrote:
>
>> I wanted to add it, bu the company that developed the application that
>> runs
>>
>> on the tomcat, says that it affect performance and has issues.
>>
>> what do you mean "validates it"? what does it do, exactly?
>>
>> Thanks
>> Hila
>>
>>
>> 2011/4/6 Filip Hanik - Dev Lists<de...@hanik.com>
>>
>>  On 4/5/2011 7:31 AM, הילה wrote:
>>>
>>>  name="jdbc/com/vstechnology/appname
>>>> scope="Shareable"
>>>> type="javax.sql.Datasource"
>>>>
>>>>
>>>> url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
>>>> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>>>> maxActive="200"
>>>> minIdle="0"
>>>> maxIdle="10"
>>>> maxWait="10000"
>>>> initialSize="20"
>>>> driverClassName="net.sourceforge.jtds.jdbc.Driver"
>>>>
>>>>  Add in
>>>
>>> testOnBorrow="true"
>>> validationQuery="select 1"
>>>
>>> this ensures that if the DB closes a connection, the pool validates it
>>>
>>> best
>>> Filip
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: JDBC Pool Disconnections

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
validate == connection is open and working

if they are worried about performance, there is a compromise that gets you best of both worlds

testOnBorrow="true"
validationQuery="select 1"
validationInterval="30000"

this ensures that in a high concurrency environment, the number of validations are limited

Filip****



On 4/6/2011 1:36 PM, הילה wrote:
> I wanted to add it, bu the company that developed the application that runs
>
> on the tomcat, says that it affect performance and has issues.
>
> what do you mean "validates it"? what does it do, exactly?
>
> Thanks
> Hila
>
>
> 2011/4/6 Filip Hanik - Dev Lists<de...@hanik.com>
>
>> On 4/5/2011 7:31 AM, הילה wrote:
>>
>>> name="jdbc/com/vstechnology/appname
>>> scope="Shareable"
>>> type="javax.sql.Datasource"
>>>
>>> url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
>>> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>>> maxActive="200"
>>> minIdle="0"
>>> maxIdle="10"
>>> maxWait="10000"
>>> initialSize="20"
>>> driverClassName="net.sourceforge.jtds.jdbc.Driver"
>>>
>> Add in
>>
>> testOnBorrow="true"
>> validationQuery="select 1"
>>
>> this ensures that if the DB closes a connection, the pool validates it
>>
>> best
>> Filip
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11
>


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


Re: JDBC Pool Disconnections

Posted by הילה <hi...@gmail.com>.
Hey,
I'm using JTDS 1.2.5
It has proven to be more stable than the JDBC driver of microsoft, so we're
using it.

Thanks
Hila


2011/4/7 Pid <pi...@pidster.com>

> On 4/6/11 8:36 PM, הילה wrote:
> > I wanted to add it, bu the company that developed the application that
> runs
> > on the tomcat, says that it affect performance and has issues.
>
> Which DB driver are you using?  In my experience some of the jTDS driver
> variations have issues.
>
>
> p
>
>
> > what do you mean "validates it"? what does it do, exactly?
> >
> > Thanks
> > Hila
> >
> >
> > 2011/4/6 Filip Hanik - Dev Lists <de...@hanik.com>
> >
> >> On 4/5/2011 7:31 AM, הילה wrote:
> >>
> >>> name="jdbc/com/vstechnology/appname
> >>> scope="Shareable"
> >>> type="javax.sql.Datasource"
> >>>
> >>>
> url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
> >>> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> >>> maxActive="200"
> >>> minIdle="0"
> >>> maxIdle="10"
> >>> maxWait="10000"
> >>> initialSize="20"
> >>> driverClassName="net.sourceforge.jtds.jdbc.Driver"
> >>>
> >> Add in
> >>
> >> testOnBorrow="true"
> >> validationQuery="select 1"
> >>
> >> this ensures that if the DB closes a connection, the pool validates it
> >>
> >> best
> >> Filip
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
>
>
>

Re: JDBC Pool Disconnections

Posted by Pid <pi...@pidster.com>.
On 4/6/11 8:36 PM, הילה wrote:
> I wanted to add it, bu the company that developed the application that runs
> on the tomcat, says that it affect performance and has issues.

Which DB driver are you using?  In my experience some of the jTDS driver
variations have issues.


p


> what do you mean "validates it"? what does it do, exactly?
> 
> Thanks
> Hila
> 
> 
> 2011/4/6 Filip Hanik - Dev Lists <de...@hanik.com>
> 
>> On 4/5/2011 7:31 AM, הילה wrote:
>>
>>> name="jdbc/com/vstechnology/appname
>>> scope="Shareable"
>>> type="javax.sql.Datasource"
>>>
>>> url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
>>> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>>> maxActive="200"
>>> minIdle="0"
>>> maxIdle="10"
>>> maxWait="10000"
>>> initialSize="20"
>>> driverClassName="net.sourceforge.jtds.jdbc.Driver"
>>>
>> Add in
>>
>> testOnBorrow="true"
>> validationQuery="select 1"
>>
>> this ensures that if the DB closes a connection, the pool validates it
>>
>> best
>> Filip
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 



Re: JDBC Pool Disconnections

Posted by הילה <hi...@gmail.com>.
I wanted to add it, bu the company that developed the application that runs
on the tomcat, says that it affect performance and has issues.

what do you mean "validates it"? what does it do, exactly?

Thanks
Hila


2011/4/6 Filip Hanik - Dev Lists <de...@hanik.com>

> On 4/5/2011 7:31 AM, הילה wrote:
>
>> name="jdbc/com/vstechnology/appname
>> scope="Shareable"
>> type="javax.sql.Datasource"
>>
>> url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
>> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>> maxActive="200"
>> minIdle="0"
>> maxIdle="10"
>> maxWait="10000"
>> initialSize="20"
>> driverClassName="net.sourceforge.jtds.jdbc.Driver"
>>
> Add in
>
> testOnBorrow="true"
> validationQuery="select 1"
>
> this ensures that if the DB closes a connection, the pool validates it
>
> best
> Filip
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: JDBC Pool Disconnections

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
On 4/5/2011 7:31 AM, הילה wrote:
> name="jdbc/com/vstechnology/appname
> scope="Shareable"
> type="javax.sql.Datasource"
> url="jdbc:jtds:sqlserver://SQLServerName:1433/DBname;useCursors=false;sendStringParametersAsUnicode=false"
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> maxActive="200"
> minIdle="0"
> maxIdle="10"
> maxWait="10000"
> initialSize="20"
> driverClassName="net.sourceforge.jtds.jdbc.Driver"
Add in

testOnBorrow="true"
validationQuery="select 1"

this ensures that if the DB closes a connection, the pool validates it

best
Filip

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