Given the number of clients and the frequency of instantiations required
you should be fine loading on demand.  However, there's no gaurentee this
will solve the problem as the COM server may still hang at an inconvienient
moment.

The Microsoft way of doing this sort of thing would be to use MTS (Trannie
server).  MTS is designed to cache your COM servers so it will be able to
start and stop them on demand.  This will also give you true transactions
with your Unix environment - maybe.  Downside?  MTS is essentially
stateless so this may require major rewrite of client and server  and the
COM object must be in-place (DLL).

However, the best solution is to stop the server from hanging...  but then
it is NT so this is probably asking too much.





Stephen Garner <[EMAIL PROTECTED]> on 27/01/99 07:55:07

Please respond to [EMAIL PROTECTED]

To:   Multiple recipients of list delphi <[EMAIL PROTECTED]>
cc:    (bcc: Peter Jones/Logistics&Information
      Technology/Christchurch/Foodstuffs)
Subject:  [DUG]:  Delphi DCOM client question




Hi,

What is the preferred method of connecting to a DCOM server?
Once per client instantiation or for each call you need to make?

I'm maintaining a Delphi DCOM client app that uses it's own
database access for reading a remote database but commits all
changes through a DCOM server that enforces business rules and
communicates the changes a set of UNIX servers. The DCOM server
in effect guarantees the changes are only applied to the database
if they have been applied on the UNIX systems.

Anyway, the client app was written connect to the DCOM server at
start up and to disconnect on exit. If, for a variety of reasons,
the DCOM server hangs we have to get everyone to shut the clients
down (sometimes with taskmanager under NT) in order to restart the
server.

Are there any problems with connecting to a DCOM server "on demand"
when each update needs to be made and then disconnecting at the end
of the transaction? Each client might connect 20-50 times a day and
we have 10 client apps running at a time.

We're running client apps written in Delphi 3.02 C/S, a DCOM server
written in C++ Builder 3 and both clients and server are running under
NT 4 SP3.

Cheers,

Stephen Garner

--
Stephen Garner          ([EMAIL PROTECTED])
Analyst/Programmer
Computer Systems Engineering (NZ) Ltd, Hamilton, New Zealand
Phone: +64 7 838 2010   Fax: +64 7 838 0977

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz






---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to