![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2006
Location: India
Posts: 25
Rep Power: 0
![]() |
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?? |
|
|
|
|
|
#2 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
|
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Feb 2006
Location: India
Posts: 25
Rep Power: 0
![]() |
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!! |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
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. |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Feb 2006
Location: India
Posts: 25
Rep Power: 0
![]() |
Thank you so much for the help,Arevos!!
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|