File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

Tomcat is not capable to handle multiple requests at a time [sic]

 
saikrishna cinux
Ranch Hand
Posts: 689
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Originally posted by Martin Simons:


but synchronizing your doGet/Post methods is
a very poor (design- and performance- wise) solution (at least when done
without a very good reason).

[ May 19, 2006: Message edited by: Martin Simons ]


Yes Mr Martin, i am synchronizing the doget method because of strong reason i will explain u every thing now.

here i am developing online examination for GRE
so, 10 students will be taking the exams cuncurently
so for this only one servlet will take entire data(questions) from the database so i think this causes verymuch burden to the server so when 10 members access the same servlet at a time then it sudenly FAILS
i dont knwo why tomcat is incapable to handle multiple user requests while fetching huge data from the database
It just throws the exception on 10 members who r taking the exam at same point of time
the exceptions are like this
for member 1-----java.sql.SQLException: Invalid column index
for member 2-----java.sql.SQLException: Closed Connection
for member 3-----java.sql.SQLException: Failed to represent internal data
so comming to my coding in tht servlet i am using lotz of Vectors for storing the data from DB and lots of inner loops and inner loops contains lots of queries

if a single user runs this application it runs perfectly...
now tell me, while developing this webapplication every one follows the same rule tht is "if the application runs well in one system then it must run on multiple systems superbly!!!" but here it fails
it even gives these type of exceptions "Failed to represent internal data"

so now what is the neccesity of Tomcat ???

what should i do now ???
that is the STRONG reason why i am using SYNCHRONIZED doGet method
so now justify....

:roll:
thanking u sir

regards
cinux

[bpsouther: Fixed casing in subject line]
[ May 19, 2006: Message edited by: Ben Souther ]
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Well, perhaps you should look at why the application is failing? It's a JDBC issue, clearly, so maybe you should be discussing it in our JDBC forum rather than blaming this on Tomcat, of all things?

Maybe the database or its driver simply isn't designed to handle concurrent requests. What are you using? I'm going to guess Microsoft Access and the toy jdbcodbc driver.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate of:
http://www.coderanch.com/t/362658/Servlets/java/java-sql-SQLException-Closed-Connection

You're getting a LOT of help there.
Please don't post the same question in multiple forums.
Doing so wastes the time of the people who are trying to help you.

Also,
Typing with the cap lock button down is the equivalent to yelling in a web forum and is considered rude. Since I've already locked this thread, I'll fix it for you.
[ May 19, 2006: Message edited by: Ben Souther ]
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic