Archive for the ‘Performance’ Category

DBCP vs C3P0

Friday, April 25th, 2008

I didn't know there was a great debate going on between DBCP and C3P0 about 6 months ago going on. My new project is using C3P0 for connection pooling with JNDI-bindable datasources and I find it really annoying to have it configured that way in development. Anyway C3P0 is a ...

The size of an object instance at runtime - pre Java 1.5

Tuesday, November 13th, 2007

In Java 1.5, Sun provides us with a miracle method that is long overdue: long java.lang.instrument.Instrumentation.getObjectSize (Object objectToSize) However, this is still limited in that it only returns the total size of the Object, not the details about the Object size in regard to its composition. Enter monq.jar from Whatizit. There's a Sizeof class ...