Re: Connection pooling
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Sun, 14 May 2006 23:11:11 +0200
"Steven Blair" <steven.blair@xxxxxxxxxxxxxx> wrote in message
news:ub7UTA5dGHA.4276@xxxxxxxxxxxxxxxxxxxxxxx
| Here is breif outline of the full app:
|
| A multi threaded TCP service (writting in C++) receives a number of
| messages. Each message spawns a new instance of a C# dll via COM.
| I have only tested the dll's being created via a Console app, but I
| suspect (and a little hope) that it works the same. My first instance of
| the C# dll will create the pool for this app, and subsequent dll's can
| use that pool.
|
Again, you don't create instances of C# DLL's, you can only create instances
of classes.
Here is what I think you are doing, a COM client (the C++ application) loads
the DLL and creates instance(s) of a class contained in the DLL. Each
message that arrives creates a new instance of a class, that instance
creates a db connection and starts a transaction, at the end of the
transaction, you close the connection.
Now, as I told you before, a pool is maintained per process (more precisely
per application domain) and has nothing to do with loading of DLL's. As long
as your application connects to the same db instance using the same
credentials, your process (application) uses the one and only pool. If
however, you change the credentials per connection, you will create a new
pool and you will incur the initial overhead for each new connection.
Now I would like to get some more questions answered;
1. What version of the framework are you running I assume v2.
2. Does your service create a thread per incoming message and do you create
an instance of the C# class in this thread?
3. How does your connection string looks like, here I mean, do you use
integrated security or sql security using explict credentials.
4. What's the interval between incoming TCP messages and what's the service
time of a transaction (duration of the connection).
Willy.
.
- Follow-Ups:
- Re: Connection pooling
- From: Steven Blair
- Re: Connection pooling
- References:
- Re: Connection pooling
- From: Willy Denoyette [MVP]
- Re: Connection pooling
- From: Steven Blair
- Re: Connection pooling
- Prev by Date: Re: Static property of type parameter - is this a CLR or C# limitation?
- Next by Date: Re: GetType() ??
- Previous by thread: Re: Connection pooling
- Next by thread: Re: Connection pooling
- Index(es):
Relevant Pages
|