ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brent Ryan" <br...@blackboard.com>
Subject RE: MS SQL Server 2000 connection reset problem
Date Thu, 17 Mar 2005 18:13:12 GMT
* The commiting/rolling back is handled by the datasource automatically.

* The max allowable connection is set to 0
* netstat -n on client and server show 3 connections established.

If I set this property to 0 then it works, but then this means there is
nothing in the pool. Right?
<property name="Pool.MaximumIdleConnections" value="0"/>

For some reason the datasource isn't running the ping command to check
the connections.  They seem to be timing out. Is there a setting in SQL
Server that causes connections to timeout?

Brent Ryan



-----Original Message-----
From: Abdullah Kauchali [mailto:abdullah.kauchali@isanusi.com] 
Sent: Thursday, March 17, 2005 11:00 AM
To: ibatis-user-java@incubator.apache.org
Subject: Re: MS SQL Server 2000 connection reset problem


Some guesses:

*  If you are using transactions, make sure you are commiting/rolling 
back the transactions.
*  Perhaps connection pool is not working and the number of server 
connection hits maximum:  check sql server connection property, set 
"Maximum Allowable Connection" to zero (0) = no maximum.
*  Do sp_who on the server to see number of concurrent connections
*  Do netstat -n to see live TCP/IP connection on the client (many 
connections for a single user is telltale sign of leaky connection
objects)

HTH,

Abdullah


Brent Ryan wrote:

>  Message I'm using Ibatis 2 with a web app and I get the following  
> error after connecting to the data source and then letting it sit for

> 2 minutes and then retrying my web applicaiton.
>
>  ERROR:2005-03-17 10:35:57,379 - Failed to queryForList - id  
> [getUsers], parameterObject [null]. Cause: java.sql.SQLException:  
> [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer:  
> socket write error
>
>  Here's my sql map config:
>
>  <transactionManager type="JDBC"> <dataSource type="DBCP"> <property 

> name="JDBC.Driver" value="${driver}"/> <property  
> name="JDBC.ConnectionURL" value="${url}"/> <property  
> name="JDBC.Username" value="${username}"/> <property  
> name="JDBC.Password" value="${password}"/> <property  
> name="JDBC.DefaultAutoCommit" value="true"/> <property  
> name="Pool.MaximumActiveConnections" value="20"/> <property  
> name="Pool.MaximumIdleConnections" value="5"/> <property  
> name="Pool.MaximumWait" value="120000"/> <property  
> name="Pool.TimeToWait" value="500"/> <property name="Pool.PingQuery"  
> value="select 1 from BBEXTRACT.USERS"/> <property  
> name="Pool.PingEnabled" value="true"/> <property  
> name="Pool.PingConnectionsOlderThan" value="1"/> <property  
> name="Pool.PingConnectionsNotUsedFor" value="1"/> </dataSource>  
> </transactionManager>
>
>
>  Thanks, <!-- A.psl { TEXT-DECORATION: none; COLOR: #4e81c4;
>  FONT-FAMILY: Verdana,Arial,fixed } A:hover { TEXT-DECORATION:  
> underline } A.psl:hover { COLOR: #999999 } .noro { FONT-SIZE: 8pt;
>  COLOR: #4e81c4; FONT-FAMILY: Verdana,Arial,fixed } .logotext {  
> TEXT-DECORATION:none; FONT-SIZE: 10pt; FONT-FAMILY:  
> Verdana,Arial,fixed } A.brand { COLOR: #777777; FONT-SIZE: 7pt;
>  FONT-FAMILY: Verdana,Arial,fixed; TEXT-DECORATION: none } --> Brent  
> Ryan
>
>  *Don't miss the 2005 Blackboard Users Conference April 12-14 in  
> Baltimore, MD! Visit
>  **http://www.blackboard.com/about/events/BbUC05/index.htm** for more
>  information.*
>
>  This e-mail is intended only for the personal and confidential use of

> the recipient(s) named above. It may include Blackboard confidential  
> and proprietary information, and is not for redistribution.
>


Don't miss the 2005 Blackboard Users Conference April 12-14 in Baltimore, MD!  
Visit http://www.blackboard.com/about/events/BbUC05/index.htm for more information.


This e-mail is intended only for the personal and confidential use of the recipient(s) named
above. 
It may include Blackboard confidential and proprietary information, and is not for redistribution.



Mime
View raw message