Refactor connections to use AS400 object - #150
Conversation
Signed-off-by: Julia Yan <julia.yan@ibm.com>
| AS400JDBCDriver driver = new AS400JDBCDriver(); | ||
|
|
||
| // Determine the database name based on connection method | ||
| String databaseName = "*LOCAL"; |
There was a problem hiding this comment.
Target database name is an oversight in the original design, but made very visible here in this refactor.
We should do one of the following:
- Add
databaseNameas an input parameter to this function and refactor all callers to use the database name provided on the "connect" option in the JSON request (that option doesn't exist yet, so this becomes a new feature) - Open an issue to track the proper implementation of database name
I suggest the issue, and we can handle that when we add proper Kerberos support
There was a problem hiding this comment.
Ope.... one can use the database name JDBC property to connect to the IASP which should work in current design. Should we just use null here? (@jeber-ibm ?)
There was a problem hiding this comment.
The "database name" JDBC property should only be used when connecting to an IASP. It cannot be used to connect to a RDB that is not an IASP.
| // Determine the database name based on connection method | ||
| String databaseName = "*LOCAL"; | ||
| if (!isRunningOnIBMi() || _connectionMethod == ConnectionMethod.TCP) { | ||
| databaseName = systemName; |
There was a problem hiding this comment.
I don't think this special case check is needed but am not sure. (@jeber-ibm ?)
There was a problem hiding this comment.
This check may not work, depending on how the system is configured. Don't use the databaseName unless you are connecting to an IASP.
Signed-off-by: Julia Yan <julia.yan@ibm.com>
|
@ThePrez I have removed the check and instead passed in null since we may not be using an IASP |
Work for #134