mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-583: Add ability to configure SQL Server instance name.
This commit is contained in:
@@ -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");
|
||||
|
@@ -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
|
||||
|
@@ -43,6 +43,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
|
||||
|
Reference in New Issue
Block a user