I have always wanted to duplicate how GoldenGate handles batch failures. In GoldenGate, you can set the parameter “batchsql BATCHTRANSOPS 2000”, for example, to send 2000 statements at a time to the database for execution. In general, this is far…
Category: Java
JAAS with Client/Server socket example
What is below is a hack on the same example floating all around the internet for using JAAS with Kerberos (Active Directory, in this case). This extends the example to send the ticket over a network socket to the server.…
Determining the order of java classes called
I thought this was pretty interesting, and perhaps incredibly useful. While attempting to understand the call stack (and being too lazy to read through reams of source code), I found that calling a java class will result in stat() system…
Querying Active Directory from java
This is just a stub I often use when configuring AD authentication for various applications. Invariably, I can use this to quickly determine why a given application configuration may be failing. import java.util.Hashtable; import javax.naming.*; import javax.naming.directory.*; class TestAD {…
Wrong permissions on /tmp cause havoc with java
We had a server that had been behaving oddly since at least April. I finally discovered why. jps returns nothing, which is the first symptom. When we strace, we see it can’t write to /tmp (our setting for java.io.tmpdir), so…
Does java reuse closed sockets when the host still has one open?
We were curious as to what the handoff is between an application that opens a network socket, and how the Linux OS handles it. Let’s assume we do what is below: import java.net.*; public class checkSocket { public static void…
Crawling all SQL Server tables and columns for a specific value
We had a quick need to search all columns in every table during a data discovery exercise. This is by no means the most efficient, but it does work. It pulls 10,000 rows at a time from each table, and…
Where is a given thread connecting?
We start by getting the PID of our running JVM… -bash-4.1$ jps 29527 Main 3560 Jps …then we print each lightweight process (threads in our JVM) in which we are interested. In our case, these are threads with zafu in…
Association rules in java
Assocation rules are a concept in which relationships between different elements of a common set can be established. For example, a study may be undertaken to determine the impact of one externally employed parent on childrens GPA in a household,…
Using Apache POI to generate Excel spreadsheets from database queries
Back in the 90’s when I first started working with computers professionally, I remember finding software for $49.95, and often much more, to do on Microsoft Windows what is now free. Apache POI (“Poor Obfuscation Implementation” 🙂 ) is a…