Multiplexed Connection

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dot.yet@gmail.com

    Multiplexed Connection

    Hi Everyone,

    I have a question (dont know if its dumb or not) related to how DB2
    manages connections. Can I have two active java threads use a single
    DB2 connection at the same time. Is it possible to have two
    independent statements running on the same DB2 connection at the same
    time ("in-flight")?


    Thanks in advance.
    dotyet

  • Ian

    #2
    Re: Multiplexed Connection

    dot.yet@gmail.c om wrote:
    Hi Everyone,
    >
    I have a question (dont know if its dumb or not) related to how DB2
    manages connections. Can I have two active java threads use a single
    DB2 connection at the same time. Is it possible to have two
    independent statements running on the same DB2 connection at the same
    time ("in-flight")?
    >
    Sure. This happens all of the time. Imagine an application that
    opens a cursor, and for each row it fetches, it issues an update to
    another table. Two separate statements, both executing at the same
    time, with a single connection.


    Ian


    Comment

    Working...