Tamino API for .NET Version 8.2.2
 —  Tamino API for .NET  —

Working with Connections

Before an application can run any commands against the Tamino database, it must create and open a TaminoConnection object.

This section describes the following functions for managing connections:


Creating a Connection

When creating a TaminoConnection object, the URL of the Tamino database must be specified as a parameter.

Example

TaminoConnection connection = new TaminoConnection("http://myserver/tamino/mydb");

A TaminoConnection object can be opened and closed repeatedly.

Top of page

Opening a Connection

A connection can be opened in one of several different connection modes. The connection mode defines how transactions are processed within this connection. For more information about the different connection modes, see dotnetapiref/SoftwareAG.Tamino.Api.TaminoConnectionMode.html.

Example

connection.Open(TaminoConnectionMode.AutoCommit);

Top of page

Closing a Connection

You should call the Close method in the TaminoConnection object when the connection is no longer required. A connection is not implicitly released when the connection object falls out of scope or is reclaimed by the garbage collector.

Top of page

Optimizing Multithreaded Performance

Under certain circumstances, you may experience performance degradation when running a multithreaded application against a single Tamino server. This is caused by the Microsoft .NET Framework, which uses a single ServicePoint per unique domain URI. By default, a ServicePoint supports just two permanent HTTP connections, in accordance with the HTTP specification.

If your system is affected by this problem, you can improve performance by setting ServicePointManager.DefaultConnectionLimit to a value greater than 2. Please note that you should only do this if you are experiencing performance problems.

Top of page