Using Tn Pools

Top  Previous  Next

TN BRIDGE Host Integration Pack allows persisting Tn3270/5250 objects in a Pools that are available in the whole application domain.

 

The method used to acquire a Tn object from the pool is:

 

VB

tnbxxxx = tnbxpool.Acquire([sessionId as String])

 

Delphi

tnbxxx = Tnbxxxx.FromPool(poolId : String,[sessionId : String],[InactivityTimeout : Integer]);

 

This method is static (shared) and it returns a Tn from the Pool with the name poolId and optionally identified by SessionId parameter. In case of no Tn object is available, it returns a new Tn object which is also added to the pool.

 

The Tn object must be released by using the method:

 

VB

tnbxpool.Release(tnobject)

 

Delphi

tnbxxx.Release;

 

Persisting telnet objects in pools allows to:

 

Reusing the connection in a disconnected environment like ASP.NET
Keeping Tn objects ready for their reuse.