Java
Yet another reason to use Oracle’s JDBC connection manager
Over the weekend we had an odd issue. We have four nodes in a cluster, with two core services. SERVICE_A runs on servers 1 and 2, while SERVICE_B runs on server 4. Server 3 is effectively idle most of the time unless we need to allow for additional throughput. Server... »
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 can use it as show below: import java.sql.*; public class checkConn { ... »
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.*; public class checkUnicode { public static void main(String args) { ... »
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 where it may be hanging. DBA’s specifically should be able to... »
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 that?!!! import java.io.*; import java.util.concurrent.locks.*; import java.net.*; import java.util.*; class MyThread implements Runnable { static Lock l =... »
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; double av = average(array); for (int i = 0; i < array.length; i++) { arr =... »
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 OID (Oracle Internet Directory). We were able to access the strings, but found ourselves concerned... »