[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: How to recover from database restart while JBoss is runn
bertnz
do-not-reply at jboss.com
Thu Apr 19 18:28:25 EDT 2007
OK - looks like I will have to solve this one myself.
Turns out that I needed to specify this additional field in my datasource descriptor (ms-sql.ds).
<!-- sql to call to check exiting connection is still ok -->
<check-valid-connection-sql>select top 1 name from sysobjects with (nolock)</check-valid-connection-sql>
This is apparently called before a pooled connection is used, if it fails (say because the connection is closed!!!!) - then the connection is released and a new one is used.
Thus - I can now reset my database server without my JBoss application dying a horrible horrible death.
Fantastic!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039079#4039079
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039079
More information about the jboss-user
mailing list