look into mysql autoReconnect

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

> From: ode...@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-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-java-h...@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

Reply via email to