ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From I L <iss...@hotmail.com>
Subject RE: connecting to datebase
Date Thu, 10 Sep 2009 18:33:25 GMT

look into mysql autoReconnect

e.g.
<property name="JDBC.ConnectionURL" value="${url}?autoReconnect=true" />

> From: odelya@jpost.com
> To: user-java@ibatis.apache.org
> Subject: connecting to datebase
> Date: Thu, 10 Sep 2009 14:39:06 +0300
> 
> Hi!
> I have a problem with connection to the database.
> I get com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
> 
> I connect like this:
> <transactionManager type="JDBC">
> 		<dataSource type="SIMPLE">
> 			<property value="${driver}" name="JDBC.Driver" />
> 			<property value="${url}" name="JDBC.ConnectionURL"
> />
> 			<property value="${username}" name="JDBC.Username"
> />
> 			<property value="${password}" name="JDBC.Password"
> />
> 			<property name="defaultAutoCommit" value="true" />
> 			<property name="defaultTransactionIsolation"
> value="2" />
> 			<property name="maxActive" value="10" />
> 			<property name="removeAbandoned" value="true" />
> 			<property name="removeAbandonedTimeout" value="30"
> />
> 			<property name="logAbandoned" value="false" />
> 			<property name="validationQuery" value="select 1" />
> 		</dataSource>
> 	</transactionManager>
> 
> Is there another way to connect to DB (other than SIMPLE) that I can try to
> avoid the error?
> It happens every 24 hours more or less
> 
> Thanks
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
> 

_________________________________________________________________
Windows Live: Keep your friends up to date with what you do online.
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009
Mime
View raw message