Question understanding Connection/Statement
From: Saad Malik (SimFox3_at_yahoo.com)
Date: 08/20/04
- Previous message: SimFox3_at_yahoo.com: "Connection/Statement question"
- Next in thread: Joe Weinstein: "Re: Question understanding Connection/Statement"
- Reply: Joe Weinstein: "Re: Question understanding Connection/Statement"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Aug 2004 01:01:27 -0700
Hi There,
Just had a quick question. Assume that we made a singleton class which
would return the reference to an already existing Connection (made
using DriverManager.. no connection pooling).
I would assume, that calling createStatements in a server/client
application would fail because a connection encapsulates the database
server and client information (IP ADDRESSES). So multiple clients with
different ip addresses would not be able to use someone's else
connection object... is this right?
Now, what if in a multi-threaded environment there is only one client
and one server... There is stil only one connection object (created by
the client). Calling createStatement should work everytime, right? Now
what about cuncurrency issues... if two statements are created then
they execute excuteUpdate() at the same time, will the connection
object simultaneously execute the queries, or will it queue them up?
Thanks..
- Previous message: SimFox3_at_yahoo.com: "Connection/Statement question"
- Next in thread: Joe Weinstein: "Re: Question understanding Connection/Statement"
- Reply: Joe Weinstein: "Re: Question understanding Connection/Statement"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|