[jboss-user] [JCA/JBoss] - Re: Tests for db connection

PeterJ do-not-reply at jboss.com
Sun Jan 11 15:18:53 EST 2009


With check-valid-connection-sql, you place a SQL statement in *-ds.xml and that statement is run. If there is no error, it is assumed that the connection is valid.

With valid-connection-checker-class-name, you write a class that performs a connection check. This class can do anything. For example, it might query certain tables to ensure that the expected data exists, or perform a benign update to ensure that the account used has update right (or doesn't have update rights!)

So the question is, would running a simple SQL statement be sufficient to verify the connection, or do you need to do something more complex?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200842#4200842

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200842



More information about the jboss-user mailing list