Skip to content

Commit

Permalink
Data Source Updates
Browse files Browse the repository at this point in the history
Signed-off-by: John Eberhard <[email protected]>
  • Loading branch information
jeber-ibm committed Oct 11, 2024
1 parent d53f1ef commit c3b079f
Show file tree
Hide file tree
Showing 5 changed files with 1,085 additions and 885 deletions.
39 changes: 37 additions & 2 deletions src/main/java/com/ibm/as400/access/AS400JDBCDataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,13 @@ public String getAccess()
return properties_.getString(JDProperties.ACCESS);
}

/**
* returns the additional authentication factor.
* @return the additional authentication factor
*/
public char[] getAdditionalAuthenticationFactor() {
return properties_.getAdditionalAuthenticationFactor();
}
/**
* Returns what behaviors of the Toolbox JDBC driver have been overridden.
* Multiple behaviors can be overridden in combination by adding
Expand Down Expand Up @@ -1555,8 +1562,14 @@ public String getQueryReplaceTruncatedParameter()
{
return properties_.getString(JDProperties.QUERY_REPLACE_TRUNCATED_PARAMETER);
}


/**
* Returns the stay alive setting. If non-zero, then this
* is the number of seconds before a host server ping request is sent
* to keep the connection from being dropped because of inactivity.
*/
public int getStayAlive() {
return properties_.getInt(JDProperties.STAY_ALIVE);
}
/*@D4A*/
/**
* Returns the mechanism used to implement query timeout.
Expand Down Expand Up @@ -5156,6 +5169,28 @@ public void setQueryOptimizeGoal(int goal)
JDTrace.logInformation (this, property + ": " + goal);
}

/**
* Sets the stay alive setting. If non-zero, then this
* is the number of seconds before a host server ping request is sent
* to keep the connection from being dropped because of inactivity.
*/
public void setStayAlive(int seconds)
{
String property = "stayAlive";

Integer oldValue = Integer.valueOf(getQueryOptimizeGoal());
Integer newValue = Integer.valueOf(seconds);

properties_.setString(JDProperties.STAY_ALIVE, newValue.toString());

changes_.firePropertyChange(property, oldValue, newValue);

if (JDTrace.isTraceOn())
JDTrace.logInformation (this, property + ": " + seconds);
}



//@550
/**
* Sets the storage limit in megabytes, that should be used for statements executing a query in a connection.
Expand Down
Loading

0 comments on commit c3b079f

Please sign in to comment.