Servlet Threads Database Connections
From: killerTomato (mail_benbrown_at_go.com)
Date: 12/24/03
- Previous message: Peter Connolly: "Re: known bugs with Oracle's JDBC?"
- Next in thread: Silvio Bierman: "Re: Servlet Threads Database Connections"
- Reply: Silvio Bierman: "Re: Servlet Threads Database Connections"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 Dec 2003 12:24:56 -0800
I have been reading a lot of posts and websites about not creating
your own threads in a servlet and that you should not do it because it
is bad practice and will be illegal in the future. What I don't
understand is why and what the alternatives are. All I every see is
don't to it and no options are given. It would seem like there are a
lot of reasons to do it.
Here is my scenario. I have multiple databases that I would like to
query data from. Each one is from some a different database server
and the queries are read only (just selects). There is no data that
is being updated and even if there were updates I would not care about
if the data returned was a little stale. I have one connection from
OS390, one AIX and one UDB NT. I don't need to use any transactions
or state. I just want the results.
Currently, my process queries each of them in sequence and then
displays the results. I was going to try and create threads for each
call and see if that would make any performance differences, but after
reading all the posts it does not look like I should even attempt it.
It would seem like kicking off to 3 different database servers and
letting them run would be faster then the my current way. Also, the
application server I am using is Websphere 5.
Thanks in advance for any links or info on my question.
Ben
- Previous message: Peter Connolly: "Re: known bugs with Oracle's JDBC?"
- Next in thread: Silvio Bierman: "Re: Servlet Threads Database Connections"
- Reply: Silvio Bierman: "Re: Servlet Threads Database Connections"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|