ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 陈抒 <csfreeb...@gmail.com>
Subject Re: Broken pipe and how to recycle dead connections
Date Fri, 06 Nov 2009 08:39:40 GMT
use the red line:


<environments default="development">
        <environment id="development">
            <transactionManager type="JDBC"/>
            <dataSource type="POOLED">
                <property name="driver" value="com.mysql.jdbc.Driver"/>
                <property name="url" value="jdbc:mysql://
192.168.0.110:3306/EffectiveEnglish"/>
                <property name="username" value="freebird"/>
                <property name="password" value="770328"/>
            </dataSource>
        </environment>
    </environments>
陈抒
Best regards
http://blog.csdn.net/sheismylife


On Fri, Nov 6, 2009 at 1:43 PM, Ron H <be.special@gmail.com> wrote:

>
> hi!
>
> i get the following exception:
> java.net.SocketException
> MESSAGE: Broken pipe
>
> STACKTRACE:
>
> java.net.SocketException: Broken pipe
>       at java.net.SocketOutputStream.socketWrite0(Native Method)
>       at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>
> my conncetion is like that:
> <transactionManager type="JDBC" commitRequired="false">
>                <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="Pool.PingQuery" value="select 1 from
> Employees" />
>                        <property name="Pool.PingEnabled" value="true" />
>                        <property name="Pool.PingConnectionsOlderThan"
> value="0" />
>                        <property name="Pool.PingConnectionsNotUsedFor"
> value="0" />
>
>                </dataSource>
>        </transactionManager>
>
> my code is like that:
> public YTUser getUserProfile(String userId) throws SQLException{
>                return (YTUser)
> sqlMapper.queryForObject("selectUser",userId);
>        }
> i read that a solution could be to recycle dead connection. is it true? how
> can i do it?
> --
> View this message in context:
> http://old.nabble.com/Broken-pipe-and-how-to-recycle-dead-connections-tp26226564p26226564.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

Mime
View raw message