PreviousNext
Help > Easycom .NET > Using Easycom for .NET > Using Easycom in a .NET development environment > Connection pooling
Connection pooling

 Easycom for .NET allows you to simply manage pooled connections. It is recommended to use pooled connection when working using a n-tiers architecture such as ASP.NET.

 

In fact, with Easycom .NET the connections are pooled by default. This means that a connection will remain "alive" even when the connection object is no longer user or when the "Close()" method is called.

The connection link remains active between the Windows process and the AS/400 job.

When a new connection is requested by the same process (on same or different thread), a pooled connection is used if there is one available. This only works if the connection has the same properties (User ID, Password, Server Name, CodePage File, SqlNaming, Init Libl, JobName, EacUnlock), otherwise a new connection is created is the PoolLimit parameter allows that.

 

Indeed, it is possible to limit the total number of jobs that are pooled using the PoolLimit parameter. This parameter is only usable on Windows platforms.

It is possible to determine a maximum time to wait to enter in a pool (in case a pool limit is defined), using the PoolTimeout parameter. If the timeout is reached a specific exception is thrown (using the EasycomException class).