Skip to content

Resolve Oracle connection

This operation populates the ConnectionString of a caller-supplied OracleConnection. Depending on how the clsConnection instance was constructed, it either composes the string locally from override credentials or resolves it from the remote ConnectInfo SOAP service, then normalizes the result before handing control back to the caller.

Field Value
Operation ID OP-CONN-001
Trigger Caller request to populate an OracleConnection
Inputs inInstance, inCode, inUserid (unused), inCnObj, constructor state (m_Userid, m_Password, m_ConnectStringOverride), optional pooling arguments (inPoolFlag, inLifeTime, inMaxPoolSize, inMinPoolSize)
Outputs inCnObj.ConnectionString populated with the final Oracle connection string
Primary components clsConnection.getConnection, ConnectInfo.ConnectInfo.GetOracleConnectString
Entry point SAIF.Framework.Connection\clsConnection.vb

Steps

  1. Instantiate a ConnectInfo.ConnectInfo SOAP proxy and a blank ConnectInfo.ConnectRequestInfo request object.
  2. The generated proxy constructor reads the service endpoint URL from the SAIF_Framework_Connection_ConnectInfo_ConnectInfo setting.
  3. Evaluate whether the instance carries override state from construction.
  4. If m_ConnectStringOverride is True, skip the remote lookup entirely and compose CnString locally from inInstance, m_Userid, and the literal placeholder ****** in place of the actual password, along with the fixed segments Persist Security Info=False, Max Pool Size=20, and Load Balance Timeout=900; (BR-001).
    • This branch does not populate Composite, does not read inCode, inUserid, or any of the pooling arguments, and — because m_Password is never read here — does not embed the caller's actual password in the resulting string.**
    • If inCnObj is Nothing, this branch does not allocate a replacement OracleConnection; the subsequent assignment to ConnectionString has no target and is effectively lost.
  5. If override state is not active, prepare the outbound request for the remote lookup.
  6. Set Composite.Code = inCode.
  7. Set Composite.Database = inInstance.
  8. Set Composite.OSUserid = System.Environment.UserName; the inUserid parameter passed by the caller is never consulted.
  9. If inCnObj is Nothing, create a new OracleConnection and use it as the resolution target.
  10. Resolve the Oracle connection string from the web service.
  11. Call Client.GetOracleConnectString(Composite).
  12. Replace every occurrence of the sentinel token ZSPECIALCHAR in the returned string with the BEL control character Chr(7) (BR-003).
  13. Normalize and apply the final string, regardless of which branch produced it.
  14. Remove the literal segment Load Balance Timeout=900; from CnString before assignment (BR-002).
  15. Assign the normalized value to inCnObj.ConnectionString.
  16. On failure: exceptions raised during proxy construction, the SOAP call, null-object access, or the final property assignment propagate to the caller unchanged; this method has no local Try/Catch handling.
  17. Return control to the caller.
  18. clsConnection does not open, test, or dispose the OracleConnection; the caller owns that lifecycle from this point forward.

Process flow

The following diagram visualizes this operation's control flow, including the two ways the final connection string can be produced.

flowchart TD
    Start([Caller invokes Oracle getConnection]) --> Init[Instantiate ConnectInfo proxy and request object]
    Init --> Override{Override state active?}
    Override -->|Yes| LocalBuild[Compose connection string locally with placeholder password]
    Override -->|No| Prepare[Populate Composite and ensure OracleConnection exists]
    Prepare --> Resolve[Call GetOracleConnectString]
    Resolve --> Restore[Replace ZSPECIALCHAR with Chr 7]
    LocalBuild --> Normalize[Strip Load Balance Timeout]
    Restore --> Normalize
    Normalize --> Assign[Assign ConnectionString]
    Assign --> EndOk([Return populated OracleConnection])

Failure and edge-case behavior

  • If inCnObj is Nothing on the override branch, this method never creates a replacement OracleConnection before attempting to assign ConnectionString, so the caller effectively receives no usable connection object.
  • The Oracle overload ignores inUserid and all four optional pooling arguments on every code path.
  • The override branch hard-codes Max Pool Size=20 and substitutes a literal ****** placeholder instead of reading m_Password; the analysis found no explanation for why the stored password is not used, so this behavior is treated as an unconfirmed limitation rather than a documented design choice.**
  • Any failure in proxy construction, the SOAP invocation, or the connection-string assignment exits the method without local recovery logic, surfacing directly to the caller.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Framework.Connection\clsConnection.vb
  • SAIF.Framework.Connection\Web References\ConnectInfo\Reference.vb
  • SAIF.Framework.Connection\My Project\Settings.Designer.vb
  • SAIF.Framework.Connection\app.config