Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 3rd, 2006, 5:07 AM   #1
sharadpro
Newbie
 
Join Date: Feb 2006
Location: India
Posts: 25
Rep Power: 0 sharadpro is on a distinguished road
slow Jsp

I am making a small website in JSP that interacts with the database<MS access>.I am using Tomcat and running the website on localhost. When I open it , It works fine for sometime but as I browse through it , it goes extremely slow.Then I stop and restart Tomcat and it runs fine again for a short time....
and then goes dead slow..
What could be the reasons??
sharadpro is offline   Reply With Quote
Old Jul 3rd, 2006, 5:51 AM   #2
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by sharadpro
What could be the reasons??
Surely that depends on your code?
Arevos is offline   Reply With Quote
Old Jul 3rd, 2006, 6:00 AM   #3
sharadpro
Newbie
 
Join Date: Feb 2006
Location: India
Posts: 25
Rep Power: 0 sharadpro is on a distinguished road
I wasnt closing closing the connections to the database..Once I did that the problem seems to have been resolved...
Was this a fluke or could it be the reason that was bugging me!!
sharadpro is offline   Reply With Quote
Old Jul 3rd, 2006, 6:13 AM   #4
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
If you don't close connections then you're tying up resources you don't need. Do this enough times, and you'll obviously see some computer slowdown.

I'd recommend using a JNDI Datasource to access your database. Tomcat automatically pools connections to JDBC sources, which will generally result in faster database access.
Arevos is offline   Reply With Quote
Old Jul 3rd, 2006, 6:15 AM   #5
sharadpro
Newbie
 
Join Date: Feb 2006
Location: India
Posts: 25
Rep Power: 0 sharadpro is on a distinguished road
Thank you so much for the help,Arevos!!
sharadpro is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:17 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC