Single Connection Object - A possible Danger

Hmmm... I always had a single connection object active for the entire app. After I discovered that only one servlet is instantiated for every servlet class in the application this problem quickly popped in my mind. Actually, this was a worry I just ignored in the past since I had total control over the app's code and could easilly make changes whenever something goes wrong. Now, we''re working for a client and I can say that I don't really have that much control over everything. I tried to research and before anything gets into trouble I decided to re-design my connection class and make it thread-safe. I think this is an old issue but few Java developers really cared about this. Besides, this is advantageous to me because I could make my app take advantage of Java's multi-threading capability and thus make my app run faster!

Hmmm... I only have a link now which I plan to study tomorrow... I think it's kinda old but should still be useful..

http://archive.coreservlets.com/Chapter18.html


ConnectionPool class, here I come!
Published Thursday, September 21, 2006 6:48 AM by lamia
Filed under: , ,

Comments

# re: Single Connection Object - A possible Danger

Monday, November 10, 2008 5:00 PM by Nilljoimb

awsome post thanks for the great info i obtain from your website keep up the great work

thanks a bunch

http://www.online4love.com - adult sex

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: