Subject RE: [ib-support] Connections
Author Wilson, Fred
That's correct. The factory thread, on startup, creates a pre-determined
number of connections, and actually "connects" them to the database. When
running, other threads "request" a connection from the factory thread, and,
if one is available, it's handed to the requesting thread. If none are
available an error is thrown. The factory thread does *nothing* with the
connections (after the initial actually call to connect to the database, and
that's done before any connections are handed out). The requesting thread
returns the connection to the factory thread (pool) when it's finished, and
at that time, the connection is available to be handed out to another
requesting thread.
This seems to be a pretty common practice, at least with other databases,
and seems to work well, the way it's done, with IB. There seems to have been
expressed, in the past, some concern about the thread safeness (is this a
word ;) ) or the gds32.dll.
We've seen no problems, so far, sharing connections between threads, as long
as the "owner" thread is the only thread doing anything with the connection
during the time that it owns it, and it's returned in a "usable" state, that
is the owner thread has no open tranactions pending on it, etc.




Best,
Fred Wilson
SE, Bell & Howell
fred.wilson@...

-----Original Message-----
From: Jason Chapman (JAC2) [mailto:jason@...]
Sent: Friday, April 19, 2002 8:06 AM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Connections


Just to be clear, it hands out a "new" connection to each thread. Once the
connection has been opened, the factory thread does not interact with the
connection at all.

If both of the above are true, I can't see a problem.

JAc.


""Wilson, Fred"" <fred.wilson@...> wrote in message
news:E9E4431A916AD21191FD00104B986AEFC239A7@......
> We have a connection factory thread in one of our applications (C++,
IB/API,
> currently IB5.6 will be FB1.0 soon/NT4.0) that creates connections and
hands
> them out to requesting theads. Anyone see any problems with this method ?
>
> Best,
> Fred Wilson
> SE, Bell & Howell
> fred.wilson@...
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>




To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/