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¶
- Instantiate a
ConnectInfo.ConnectInfoSOAP proxy and a blankConnectInfo.ConnectRequestInforequest object. - The generated proxy constructor reads the service endpoint URL from the
SAIF_Framework_Connection_ConnectInfo_ConnectInfosetting. - Evaluate whether the instance carries override state from construction.
- If
m_ConnectStringOverrideisTrue, skip the remote lookup entirely and composeCnStringlocally frominInstance,m_Userid, and the literal placeholder******in place of the actual password, along with the fixed segmentsPersist Security Info=False,Max Pool Size=20, andLoad Balance Timeout=900;(BR-001).- This branch does not populate
Composite, does not readinCode,inUserid, or any of the pooling arguments, and — becausem_Passwordis never read here — does not embed the caller's actual password in the resulting string.** - If
inCnObjisNothing, this branch does not allocate a replacementOracleConnection; the subsequent assignment toConnectionStringhas no target and is effectively lost.
- This branch does not populate
- If override state is not active, prepare the outbound request for the remote lookup.
- Set
Composite.Code = inCode. - Set
Composite.Database = inInstance. - Set
Composite.OSUserid = System.Environment.UserName; theinUseridparameter passed by the caller is never consulted. - If
inCnObjisNothing, create a newOracleConnectionand use it as the resolution target. - Resolve the Oracle connection string from the web service.
- Call
Client.GetOracleConnectString(Composite). - Replace every occurrence of the sentinel token
ZSPECIALCHARin the returned string with the BEL control characterChr(7)(BR-003). - Normalize and apply the final string, regardless of which branch produced it.
- Remove the literal segment
Load Balance Timeout=900;fromCnStringbefore assignment (BR-002). - Assign the normalized value to
inCnObj.ConnectionString. - 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/Catchhandling. - Return control to the caller.
clsConnectiondoes not open, test, or dispose theOracleConnection; 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
inCnObjisNothingon the override branch, this method never creates a replacementOracleConnectionbefore attempting to assignConnectionString, so the caller effectively receives no usable connection object. - The Oracle overload ignores
inUseridand all four optional pooling arguments on every code path. - The override branch hard-codes
Max Pool Size=20and substitutes a literal******placeholder instead of readingm_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.
Related documentation¶
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.vbSAIF.Framework.Connection\Web References\ConnectInfo\Reference.vbSAIF.Framework.Connection\My Project\Settings.Designer.vbSAIF.Framework.Connection\app.config