This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes time consuming DB work from servlet..... 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 » Java » Servlets
Bookmark "time consuming DB work from servlet....." Watch "time consuming DB work from servlet....." New topic
Author

time consuming DB work from servlet.....

sean cee
Ranch Hand

Joined: Oct 24, 2000
Posts: 115
If servlet's doXXX() method does "some work" with the DB which takes a bit of time and many users want to do this "some work".
And I was thinking of using a multithread doing this.. (like connection pooling )
Say, have a separate class(extends thread) that does "some work" with the DB.... but then many clients call servlet's doXXX() method... how is this going to work? I just could not combine those two together to think of a solution.
Can anyone suggest a right way of doing this ?
Thanks in advance.


Sean <br />SCJP2, SCJP2p1.4, SCWCD
Sandeep Jain
Ranch Hand

Joined: Oct 25, 2000
Posts: 124
Hi ,
Servlets are by default Multithreaded. So u need not bother about creating a multithreaded class and then doing the DbOperation .


Try and Try Till u succeed<br /> <br />Sandeep Jain
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: time consuming DB work from servlet.....
 
Similar Threads
session timeouts
Servlet
JSP MVC JDBC
HttpServletRequest object
Servlet request thread ....