You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by yhliu <yh...@cn.ufinity.com> on 2009/04/15 04:27:07 UTC

Some one can help me?

 I got a problem that the program will throw close connection exception when the DB server(oracle 10G) shut down and it is unforeseeable, the worse is it will not connect the DB server in a successful manner again when the DB server resurged. After discuss with my colleagues, the point is how can I reconnect the DB server or get new connection from Pool? and what the use's of SqlMapTransactionManager.setUserConnection(...) , Can I use this method to get new connection with DB server?
Thx for any help!

2009-04-15 



yhliu 

Re: Some one can help me?

Posted by Nicholoz Koka Kiknadze <ki...@gmail.com>.
Follow Nathan's suggestion.

>Look up ping query in the developers manual.   It will validate the query
before it uses it

In fact it will validate connection, discard the old one if necessary and
opens/return fresh one.

On Tue, Apr 14, 2009 at 11:13 PM, yhliu <yh...@cn.ufinity.com> wrote:

>  Thanks for your reply.
>
> okay, the reason of this iusse may be the end transaction method was called but there is not any transaction started in my program, but there are too many classes to correct,
>
> it will be cost very high because this section is working with the production.
>
> So how can I release the connections when the DB server shut down and get new connection to connecting DB server?
>
> 2009-04-15
> ------------------------------
>
>




On Tue, Apr 14, 2009 at 10:47 PM, Nathan Maves <na...@gmail.com>wrote:

> Look up ping query in the developers manual.   It will validate the query
> before it uses it.
>
> On Apr 14, 2009, at 8:27 PM, "yhliu" <yh...@cn.ufinity.com> wrote:
>
>  I got a problem that the program will throw close connection exception
> when the DB server(oracle 10G) shut down and it is unforeseeable, the worse
> is it will not connect the DB server in a successful manner again when the
> DB server resurged. After discuss with my colleagues, the point is how can I
> reconnect the DB server or get new connection from Pool? and what the use's
> of SqlMapTransactionManager.setUserConnection(...) , Can I use this method
> to get new connection with DB server?
> Thx for any help!
>
> 2009-04-15
> ------------------------------
> yhliu
>
>

Re: Some one can help me?

Posted by Nathan Maves <na...@gmail.com>.
Look up ping query in the developers manual.   It will validate the  
query before it uses it.

On Apr 14, 2009, at 8:27 PM, "yhliu" <yh...@cn.ufinity.com> wrote:

>  I got a problem that the program will throw close connection  
> exception when the DB server(oracle 10G) shut down and it is  
> unforeseeable, the worse is it will not connect the DB server in a  
> successful manner again when the DB server resurged. After discuss  
> with my colleagues, the point is how can I reconnect the DB server  
> or get new connection from Pool? and what the use's of  
> SqlMapTransactionManager.setUserConnection(...) , Can I use this  
> method to get new connection with DB server?
> Thx for any help!
>
> 2009-04-15
> yhliu