[jboss-user] [Datasource Configuration] - Re: How to Auto-Reconnect jtds on DB restart

Thunder Lei do-not-reply at jboss.com
Wed Sep 15 06:30:11 EDT 2010

Thunder Lei [http://community.jboss.org/people/Thunder.Farmer] created the discussion

"Re: How to Auto-Reconnect jtds on DB restart"

To view the discussion, visit: http://community.jboss.org/message/561473#561473

As far as I know, the  check-valid-connection-sql will do the trick for you. I verified this on both mysql and informix server.
I believe your problem lies in spring beans which is cached and hence has no chance to get the newly created connection from JBoss.

I would suggest that you change your datasource bean to "prototype" to try and verify my guess.
Also you need to config *ALL* the beans which refer to datasource bean to be "prototype".

BTW, configurating the datasource to be a "prototype" bean is not best practice.
If you verified that my guess turn out to be true, you need to find sulotion from spring side and not JBoss side.


Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100915/4707c56e/attachment.html 

More information about the jboss-user mailing list