Subject | RE: [ib-support] Re: Can anyone help: Error reading data from the connection |
---|---|
Author | Wilson, Fred |
Post date | 2002-09-20T21:20:17Z |
Can anyone else confirm this, absolutely. This sounds a little suspicious
the TSL and all.
For, actually, a few years now, we've had a thread that allocated and
connected a bunch of database connections, and then would hand the handle
out to other threads, as requested. These threads would return the
connection handles to the connection pool thread, when they were finished,
and the handles could be re-used. The only problems what we've really had
with this aplication was regarding IBObjects. This is one of our older
applications, that we haven't totally re-vamped yet (removal of IBO) and
we're using a back version of IBO. Anyway IBO has (or at least did have with
our version) a problem with TSL and great care had to be taken to NULL out
all of the various pointers in the handles. Once we've found and fixed that,
we've been running problem free. BTW, this is with Interbase 5.6 and
Firebird 1.0, on Windows NT4.0 (various SP's) and W2K.
Best regards,
Fred Wilson
SE, Bell & Howell
fred.wilson@...
-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@...]
Sent: Wednesday, September 18, 2002 11:53 PM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Re: Can anyone help: Error reading data from
the connection
Weird... ah well - I've always done the connection/thread thing...
With regards,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase
http://www.upscene.com
Firebird Workbench - the developer tool for Firebird
http://www.upscene.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
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/
the TSL and all.
For, actually, a few years now, we've had a thread that allocated and
connected a bunch of database connections, and then would hand the handle
out to other threads, as requested. These threads would return the
connection handles to the connection pool thread, when they were finished,
and the handles could be re-used. The only problems what we've really had
with this aplication was regarding IBObjects. This is one of our older
applications, that we haven't totally re-vamped yet (removal of IBO) and
we're using a back version of IBO. Anyway IBO has (or at least did have with
our version) a problem with TSL and great care had to be taken to NULL out
all of the various pointers in the handles. Once we've found and fixed that,
we've been running problem free. BTW, this is with Interbase 5.6 and
Firebird 1.0, on Windows NT4.0 (various SP's) and W2K.
Best regards,
Fred Wilson
SE, Bell & Howell
fred.wilson@...
-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@...]
Sent: Wednesday, September 18, 2002 11:53 PM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Re: Can anyone help: Error reading data from
the connection
> >>>At this point another thread maySo the connection handles have a context of the thread?
> >>>acquire this db handle. Is this safe?
> >>
> >>
> >>No. Start each thread and create the db handle within the thread.
> >>
> >>You need to think about keeping a pool of threads and letting each
> >>thread signal when it is ready for new work.
> >
> >
> > Why is this different? Or actually, why doesn't the other approach work?
> >
>
> In the first approach a pool of database handles are created in
> (presumably) the main thread and a handle is passed to a worker thread
> as required. This is the crux of the problem. The current library is
> only thread safe if the database handle is created and used within the
> same thread.
Weird... ah well - I've always done the connection/thread thing...
With regards,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase
http://www.upscene.com
Firebird Workbench - the developer tool for Firebird
http://www.upscene.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
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/