Reusing connections to databases

TDI assembly lines often have several connectors accessing the same database: these might be SQL, LDAP, or something else. If you configure each one independently then they will each open a separate connection to the database (even if they inherit from a library connector). This is obviously inefficient.

The solution to this problem is to just configure the connection parameters in one connector and to have all the others inherit the connection. To do this, look in the configuration->connection tab of the connector. Click on the Inherit From button and look for the name of your master connector preceded by the text 'reuse'; Or for TDI 6, an at_-symbol (@). Selecting this will change the configuration panel to show the message _Reusing Connector From .... and both connectors will then share a connection to the database.

Note that this inheritance only works within one assembly line: you cannot share connections between assembly lines.

Thanks to Christian Chateauvieux for pointing this out in a newsgroup discussion on JDBC performance. and to EddieHartman for pointing out that re-using connections is not always a good idea.

-- AndrewFindlay - 09 Dec 2005 -- EddieHartman - 25 Feb 2011
Topic revision: r3 - 25 Feb 2011, EddieHartman - This page was cached on 09 Aug 2024 - 17:03.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TDI Users? Send feedback