Don’t try this at home

and why would you. I should open a new category that includes the intersection of Java and Rants and the name would be “Errors I will not repeat” …. today I did the unbelievable: the one and only object in my webservice that cannot be static is the one that opens and closes database connections. Oh well of course the data objects cannot be static either but that is obvious. And I was wondering – when testing my service with multiple clients – where all the exceptions came from “Asche auf mein Haupt”, stupid error. Stupid. Stupid. Don’t try this. And repeat after me: “You do not make the data-base connection static, you do not make the data-base connection static, you do not ….” Oh come on laugh some, I did too (because: oh big surprise it didn’t take me long to localize this error).