Screen Project - Connection Pool

Setting up a connection pool for Screens Project


Screen Connection Pools (3270 / 5250)

Overview

Screen connection pools efficiently manage terminal sessions to mainframe (3270) or IBM i (5250) systems. Instead of opening a new terminal session for each request, a pool maintains a set of pre-initialized connections that can be reused. This approach improves performance, reduces connection overhead, and ensures consistent access to host systems.

Lifecycle

Each pool controls the lifecycle of its screen sessions through two key flows:

Initialize

The Initialize flow establishes each terminal session and executes predefined navigation logic to reach a specific “ready” screen. The connection remains on this predetermined screen, waiting for incoming operations. This ensures that every pooled session starts from a known and stable state, ready for immediate use.

Cleanup

The Cleanup flow ensures that sessions return to the predetermined initial screen before being released back to the pool. This may include performing navigation steps or issuing commands to reset the terminal state, guaranteeing that subsequent users receive a consistent, predictable session.

Benefits

  • Reduced overhead – Reuses existing sessions instead of creating new ones.
  • Predictable starting state – Each session begins from the same known screen.
  • Improved reliability – Proper cleanup prevents screen drift or inconsistent session states.

By using Initialize and Cleanup logic around a controlled set of pooled sessions, screen connection pools provide stable and efficient access to 3270/5250 systems.













Pool Configuration

  • Min Connections

    The minimum number of connections that remain open and ready for use. The pool will always maintain at least this number of active sessions.

  • Max Connections

    The maximum number of connections the pool can open. Once this limit is reached, new requests must wait for an existing connection to be returned to the pool.

  • Idle Timeout

    The duration (in minutes) that a connection can remain idle before being closed. The pool will never close connections below the defined Min Connections threshold.

  • Keep Alive

    Some mainframe systems may automatically close idle sessions. To prevent this, the pool can perform a periodic keep-alive action that resets the session’s idle timer.

    • Action – The command or action to execute. It’s important to select one that does not navigate away from the current screen.
    • Interval – The amount of idle time (in minutes) after which the keep-alive action should be performed.