Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8975

Re: Problem using dll in PB 11.5 webservice

$
0
0

That's correct.  The global variables are only global within the context of a single instance of the service.  What you're thinking of is a static variable, something that would be shared across all instances of the service.  Generally, that's not considered a good approach.  You really want to moving any tracking of users and service state into a database all the instances access.  That way, if you end up deploying your service to a clustered environment the state tracking approach still works.

 

As for the database connection, make sure you are using ADO.Net.  ADO.Net automatically provides connection pooling so that each instance of the service will pull the connection from the pool.

 

"By default, connection pooling is enabled in ADO.NET. Unless you explicitly disable it, the pooler optimizes the connections as they are opened and closed in your application. You can also supply several connection string modifiers to control connection pooling behavior. For more information, see "Controlling Connection Pooling with Connection String Keywords" later in this topic."

 

From SQL Server Connection Pooling (ADO.Net)


Viewing all articles
Browse latest Browse all 8975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>