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:
When creating a TaminoConnection
object, the URL
of the Tamino database must be specified as a parameter.
TaminoConnection connection = new TaminoConnection("http://myserver/tamino/mydb");
A TaminoConnection
object can be opened and
closed repeatedly.
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.
connection.Open(TaminoConnectionMode.AutoCommit);
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.
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.