Category: Java

JDBC connection timeout

While testing a remote data center today, we had some network connectivity issues. We twiddled our thumbs while waiting for connections to throw an exception due to a network block. I found the setLoginTimeout() method on the DriverManager class. You…

Who’s blocking my java?

Hanging java applications can be a system architects worst nightmare. There are so many pieces in the stack, finding where the true issue lies can be a daunting task. Fortunately, you can dump all threads in a JVM to see…

Statistical functions with java

Below is a simple set of classes for performing your own statistical analysis. As noted, they are simple (no multiple regression analysis, etc.) class myStats { double standardDeviation (double[] array) { double[] arr = new double[array.length]; double av = average(array);…

Getting connection strings from LDAP

After a recent migration, we found deficiencies with the process of how clients connect. As such, we are trying to standardize our repository of connection strings. We implemented an OpenLDAP server and added the schema information for Oracle objects from…