The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ralf Rommel:
IP: One thing is badly designed for sure, though: the class name...
Actually, the name of the acutal is even worse. I'm not posting it, for my manager also visits JavaRanch, and I don't want him to sniff me posting here asking for answers !
IP: You don't need to declare all the local variables at the top of a method
Coding standards of this Organization
When I access a datasource from a Servlet, I used to initialize the datasource in the init() method and reuse it in service() method to get the connections later. How do I acheive a similar effect here?
I mean, everytime the isValid() method is called, I need to lookup for the datasource again and again. Are there any better ways to do it?
If I make it static, I know one instance of it will shared by all the objects. But even that doesn't help. So is there a way to initialize the datasource once, and keep it safe for a longer span?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Mani
Quaerendo Invenietis
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|