protected Properties buildProperties(final String userName, final String password) { Properties props = super.buildProperties(userName, password); if (this.getAutoFailover() != null) { props.setProperty(TeiidURL.CONNECTION.AUTO_FAILOVER, this.getAutoFailover()); } if (this.encryptRequests) { props.setProperty(TeiidURL.CONNECTION.ENCRYPT_REQUESTS, Boolean.TRUE.toString()); } if (getLoginTimeout() > 0) { props.setProperty(TeiidURL.CONNECTION.LOGIN_TIMEOUT, String.valueOf(getLoginTimeout())); } if (getJaasName() != null) { props.setProperty(TeiidURL.CONNECTION.JAAS_NAME, getJaasName()); } if (getKerberosServicePrincipleName() != null) { props.setProperty(TeiidURL.CONNECTION.KERBEROS_SERVICE_PRINCIPLE_NAME, getKerberosServicePrincipleName()); } return props; }
protected Properties buildProperties(final String userName, final String password) { Properties props = super.buildProperties(userName, password); if (this.getAutoFailover() != null) { props.setProperty(TeiidURL.CONNECTION.AUTO_FAILOVER, this.getAutoFailover()); } if (this.encryptRequests) { props.setProperty(TeiidURL.CONNECTION.ENCRYPT_REQUESTS, Boolean.TRUE.toString()); } if (getLoginTimeout() > 0) { props.setProperty(TeiidURL.CONNECTION.LOGIN_TIMEOUT, String.valueOf(getLoginTimeout())); } if (getJaasName() != null) { props.setProperty(TeiidURL.CONNECTION.JAAS_NAME, getJaasName()); } if (getKerberosServicePrincipleName() != null) { props.setProperty(TeiidURL.CONNECTION.KERBEROS_SERVICE_PRINCIPLE_NAME, getKerberosServicePrincipleName()); } return props; }
public void testGetLoginTimeout() { try { final int actual = 1000; dataSource.setLoginTimeout(actual); final int result = dataSource.getLoginTimeout(); assertEquals(result,actual); } catch ( SQLException e ) { fail("Error obtaining login timeout"); //$NON-NLS-1$ } }