File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat is not capable to handle multiple requests at a time [sic] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Reply locked New topic
Author

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

saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
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 ]

A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

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.


[Jess in Action][AskingGoodQuestions]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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 ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
jQuery in Action, 2nd edition
 
subject: Tomcat is not capable to handle multiple requests at a time [sic]
 
Similar Threads
Singleton
Can we have two tomcat's running on the same machine with 2 different port numbers
java.sql.SQLException: Closed Connection
NULL POINTER eXCEPTION
how to get class in the jar as inputstream