× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I check for a null value and then throw an exception or log the exception. Then I have a timer that waits and retries x number of times (set in a properties file) and then eventually throws an exception if the threshold of attempts has been exceeded.

Pete


On 7/7/2010 6:47 AM, Glenn Holmer wrote:
We sometimes have network problems here where a JDBC connection from a
Linux server to one of our AS/400s is dropped or cannot be established.
What is the best way to check for this in code before attempting
operations on the connection? I tried this:

conn = DriverManager.getConnection("jdbc:as400://"...
if (!conn.isValid(10)) {
// logging or notification here
}

but got this exception:

java.lang.AbstractMethodError:
com.ibm.as400.access.AS400JDBCConnection.isValid(I)Z

I could always grab the DatabaseMetaData and try to read it...?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.