Servlet Threads Database Connections

From: killerTomato (mail_benbrown_at_go.com)
Date: 12/24/03

  • Next message: Johan: "newbie: making data object to be displayed and printed"
    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


  • Next message: Johan: "newbie: making data object to be displayed and printed"

    Relevant Pages

    • Re: The internet: has it become a wasteland?
      ... been reading books (mostly history but some economics and ... newsgroups posts and reading newsgroup posts, ... I dont think I miss much. ... There is a limitless amount of idiots in the world...and only ...
      (sci.research.careers)
    • Re: Porsche 911 (996) Tiptronic - good? Paging TDM!
      ... I meant what I said about enjoying reading your posts by the way. ... After first reading the thread about your friend buying the Porsche, ... I still don't get the rampant sex joke? ...
      (uk.rec.cars.modifications)
    • Re: OT: PING Don Bowey
      ... I've been reading your posts - informative and clear, ... Beyond that, a President with any courage, intelligence and leadership ... is that no one Party is responsible for the mess ...
      (sci.electronics.design)
    • Re: The internet: has it become a wasteland?
      ... been reading books (mostly history but some economics and ... newsgroups posts and reading newsgroup posts, ... days trial...then kill file them... ... There is a limitless amount of idiots in the world...and only ...
      (sci.research.careers)
    • Re: Porsche 911 (996) Tiptronic - good? Paging TDM!
      ... I meant what I said about enjoying reading your posts by the way. ... Anyway, if your friend is working all those hours, he's a mug! ... After first reading the thread about your friend buying the Porsche, ...
      (uk.rec.cars.modifications)