Stop leaking database connections in java app