Subject | Re: Problem with multi-threaded update/query |
---|---|
Author | Adam |
Post date | 2007-06-15T00:39:50Z |
> Can anyone tell me - do the queries in both the threads need to beIf they are sharing a single connection, then yes, you need to be
> synchronized, or is the correct way to do this actually to create a
> second connection to the database (for the second thread to use)?
synchronized. If each thread has its own connection, there is no
synchornization requirement.
You must however make sure that only one thread within your
application is attempting to create a single connection component at a
time.
Adam