Subject Multi-threaded ISAPI hangs
Author Ed Dressel
D7, FB 1.5

This is critical--I have this in production.

I've written multithreaded apps a number of times, there's no rocket
science about them-but I can not get this to work.

I have a TIB_Session (first component on the DM, meaning it is the
first one in the data module), and a TIB_Connection on a TDataModule.
For each call into the ISAPI, I create a new instance of the data
module. (Note that the connection doesn't have any thing
that 'points' to the session, but I don't see where it should).

Now when I run one connection at a time to the database, it works
fine, but as soon as I try to run simultaneously, the DLL hangs. I
have traced it (using CodeSite) to the 2nd instance trying to connect
to the database.

The server doesn't max out--there's no apparent reason for the hang.
But everytime I call.

I had .DiscoonectToPool in the destructor but removed that thinking I
might be using it wrong. This didn't help.

My DFM is below.

Any ideas on what I might be doing wrong?

Thanks

Ed Dressel

object dmRegSvc: TdmRegSvc
OldCreateOrder = False
Left = 192
Top = 163
Height = 580
Width = 772
object IB_Session1: TIB_Session
AllowDefaultConnection = False
AllowDefaultTransaction = False
DefaultConnection = iboConn
EditingColor = clYellow
InsertingColor = clLime
DeletingColor = clRed
SearchingColor = clAqua
ReadOnlyColor = clSilver
SelectedColor = clBlue
InvalidColor = clNone
PreparedColor = clGrayText
BrowsingColor = clWindow
StoreActive = False
Left = 40
Top = 24
end
object iboConn: TIB_Connection
PasswordStorage = psNotSecure
Params.Strings = (
'PATH=<DB NAME>
'USER NAME=<USER NAME>')
AfterDisconnect = iboConnAfterDisconnect
Left = 152
Top = 24
SavedPassword = '...'
end
end