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…
Category: Java
Do we actually use characters that require more than one byte?
I couldn’t find a way to identify those columns that actually had a character with a code point value greater than 255. As a result, I ended up writing the following. If you have better way, please reply. import java.sql.*;…
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…
Java Lock class is great for test casing
OK, so while trying to understand Oracle’s redo latching mechanisms (we have been experiencing a nightmare with log file sync since switching to a new DMX subsystem), I found that java 1.5 has a new Lock class. How cool is…
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…