Merge 1.2.0 changes back to master.

This commit is contained in:
Michael Jumper
2020-06-16 01:31:53 -07:00
3 changed files with 33 additions and 0 deletions

View File

@@ -69,6 +69,11 @@ public class SQLServerAuthenticationProviderModule implements Module {
myBatisProperties.setProperty("JDBC.schema", environment.getSQLServerDatabase());
myBatisProperties.setProperty("JDBC.username", environment.getSQLServerUsername());
myBatisProperties.setProperty("JDBC.password", environment.getSQLServerPassword());
String instance = environment.getSQLServerInstance();
if (instance != null)
myBatisProperties.setProperty("JDBC.instanceName", instance);
myBatisProperties.setProperty("JDBC.autoCommit", "false");
myBatisProperties.setProperty("mybatis.pooled.pingEnabled", "true");
myBatisProperties.setProperty("mybatis.pooled.pingQuery", "SELECT 1");

View File

@@ -172,6 +172,23 @@ public class SQLServerEnvironment extends JDBCEnvironment {
);
}
/**
* Returns the instance name of the SQL Server installation hosting the
* Guacamole database, if any. If unspecified it will be null.
*
* @return
* The instance name of the SQL Server install hosting the Guacamole
* database, or null if undefined.
*
* @throws GuacamoleException
* If an error occurs reading guacamole.properties.
*/
public String getSQLServerInstance() throws GuacamoleException {
return getProperty(
SQLServerGuacamoleProperties.SQLSERVER_INSTANCE
);
}
/**
* Returns the port number of the SQLServer server hosting the Guacamole
* authentication tables. If unspecified, this will be the default

View File

@@ -44,6 +44,17 @@ public class SQLServerGuacamoleProperties {
public String getName() { return "sqlserver-hostname"; }
};
/**
* The instance name of the SQL Server where the Guacamole database is running.
*/
public static final StringGuacamoleProperty SQLSERVER_INSTANCE =
new StringGuacamoleProperty() {
@Override
public String getName() { return "sqlserver-instance"; }
};
/**
* The port of the SQLServer server hosting the Guacamole authentication