From a7746863115a867cd442b43d3f50d1c5710f2e33 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 12 Nov 2015 12:44:40 -0800 Subject: [PATCH] GUAC-1373: Injected JDBCEnvironment should be private. --- .../tunnel/ConfigurableGuacamoleTunnelService.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/tunnel/ConfigurableGuacamoleTunnelService.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/tunnel/ConfigurableGuacamoleTunnelService.java index 0f9bf15f0..b34a4ff0a 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/tunnel/ConfigurableGuacamoleTunnelService.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/tunnel/ConfigurableGuacamoleTunnelService.java @@ -50,9 +50,10 @@ public class ConfigurableGuacamoleTunnelService extends AbstractGuacamoleTunnelService { /** - * The configuration for the current JDBC environment. + * The Guacamole server environment. */ - @Inject JDBCEnvironment jdbcEnvironment; + @Inject + private JDBCEnvironment environment; /** * Set of all currently-active user/connection pairs (seats). @@ -150,12 +151,12 @@ public class ConfigurableGuacamoleTunnelService // Determine per-user limits on this connection Integer connectionMaxConnectionsPerUser = connection.getModel().getMaxConnectionsPerUser(); if (connectionMaxConnectionsPerUser == null) - connectionMaxConnectionsPerUser = jdbcEnvironment.getDefaultMaxConnectionsPerUser(); + connectionMaxConnectionsPerUser = environment.getDefaultMaxConnectionsPerUser(); // Determine overall limits on this connection Integer connectionMaxConnections = connection.getModel().getMaxConnections(); if (connectionMaxConnections == null) - connectionMaxConnections = jdbcEnvironment.getDefaultMaxConnections(); + connectionMaxConnections = environment.getDefaultMaxConnections(); // Attempt to aquire connection according to per-user limits Seat seat = new Seat(username, connection.getIdentifier()); @@ -202,12 +203,12 @@ public class ConfigurableGuacamoleTunnelService // Determine per-user limits on this connection group Integer connectionGroupMaxConnectionsPerUser = connectionGroup.getModel().getMaxConnectionsPerUser(); if (connectionGroupMaxConnectionsPerUser == null) - connectionGroupMaxConnectionsPerUser = jdbcEnvironment.getDefaultMaxGroupConnectionsPerUser(); + connectionGroupMaxConnectionsPerUser = environment.getDefaultMaxGroupConnectionsPerUser(); // Determine overall limits on this connection group Integer connectionGroupMaxConnections = connectionGroup.getModel().getMaxConnections(); if (connectionGroupMaxConnections == null) - connectionGroupMaxConnections = jdbcEnvironment.getDefaultMaxGroupConnections(); + connectionGroupMaxConnections = environment.getDefaultMaxGroupConnections(); // Attempt to aquire connection group according to per-user limits Seat seat = new Seat(username, connectionGroup.getIdentifier());