FromPool Shared/Static Method

Top  Previous  Next

Gets a free Tn3270/Tn5250 object from a pool of objects.

 

VB.NET Syntax

 

tnxxxx.FromPool(poolId as String,[sessionId as String],[InactivityTimeout as Integer])

 

C# Syntax

 

tnxxxx.FromPool(string poolId,[string sessionId],[int InactivityTimeout]);

 

Remarks

 

Gets a Tn3270/Tn5250 object from a pool named "poolId". If there's no a free object in the named pool, it creates a new one, adds it to the pool and returns the newly created object.

 

If the sessionId parameter is specified, the specific associated object is returned. Under ASP.NET environment, each Telnet object has associated the Session's SessionId string. Under ASP.NET, calling this method passing the Sessions's SessionId as second parameter it is a safe way to get access to the same telnet object from one page to another under the same ASP.NET session.

 

InactivityTimeout parameter indicates, in minutes, how much time the telnet object will remain in the pool without activity. Default timeout is 5 minutes.

 

To return an object to the pool you must call Release method.

 

See also Release method.