Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Source Updates #211

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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