/** * Get's the name of the user who got this connection. * @return Sring object giving the user name * @throws SQLException if the connection is closed */ String getUserName() throws SQLException { checkConnection(); return this.serverConn.getLogonResult().getUserName(); }
/** * Get's the name of the user who got this connection. * @return Sring object giving the user name * @throws SQLException if the connection is closed */ String getUserName() throws SQLException { checkConnection(); return this.serverConn.getLogonResult().getUserName(); }
@Test public void testChangeUser() throws Exception { Properties p = new Properties(); SocketServerConnection connection = createConnection(null, p); assertEquals("fooUser", connection.getLogonResult().getUserName()); p.setProperty(TeiidURL.CONNECTION.USER_NAME, "newUser"); connection.authenticate(); assertEquals("newUser", connection.getLogonResult().getUserName()); }