private void setBrokerURL(String brokerURL) { ConnectionFactoryParser cfParser = new ConnectionFactoryParser(); try { URI uri = cfParser.expandURI(brokerURL); serverLocator = ServerLocatorImpl.newLocator(uri); cfParser.populateObject(uri, this); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } if (getUser() == null) { setUser(DefaultConnectionProperties.DEFAULT_USER); } if (getPassword() == null) { setPassword(DefaultConnectionProperties.DEFAULT_PASSWORD); } }
private void setBrokerURL(String brokerURL) { ConnectionFactoryParser cfParser = new ConnectionFactoryParser(); try { URI uri = cfParser.expandURI(brokerURL); serverLocator = ServerLocatorImpl.newLocator(uri); cfParser.populateObject(uri, this); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } if (getUser() == null) { setUser(DefaultConnectionProperties.DEFAULT_USER); } if (getPassword() == null) { setPassword(DefaultConnectionProperties.DEFAULT_PASSWORD); } }
private void setBrokerURL(String brokerURL) { ConnectionFactoryParser cfParser = new ConnectionFactoryParser(); try { URI uri = cfParser.expandURI(brokerURL); serverLocator = ServerLocatorImpl.newLocator(uri); cfParser.populateObject(uri, this); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } if (getUser() == null) { setUser(DefaultConnectionProperties.DEFAULT_USER); } if (getPassword() == null) { setPassword(DefaultConnectionProperties.DEFAULT_PASSWORD); } }
private void setBrokerURL(String brokerURL) { ConnectionFactoryParser cfParser = new ConnectionFactoryParser(); try { URI uri = cfParser.expandURI(brokerURL); serverLocator = ServerLocatorImpl.newLocator(uri); cfParser.populateObject(uri, this); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } if (getUser() == null) { setUser(DefaultConnectionProperties.DEFAULT_USER); } if (getPassword() == null) { setPassword(DefaultConnectionProperties.DEFAULT_PASSWORD); } }
private void setBrokerURL(String brokerURL) { ConnectionFactoryParser cfParser = new ConnectionFactoryParser(); try { URI uri = cfParser.expandURI(brokerURL); serverLocator = ServerLocatorImpl.newLocator(uri); cfParser.populateObject(uri, this); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } if (getUser() == null) { setUser(DefaultConnectionProperties.DEFAULT_USER); } if (getPassword() == null) { setPassword(DefaultConnectionProperties.DEFAULT_PASSWORD); } }
Assert.assertEquals("ensure password is set", "myPassword", connectionFactory.getPassword());
Assert.assertEquals(password, temp.getPassword()); Assert.assertEquals(clientFailureCheckPeriod, temp.getClientFailureCheckPeriod()); Assert.assertEquals(connectionTTL, temp.getConnectionTTL());