@Test(timeout = 5000) public void testCreateConnectionWithPortOutOfRange() throws Exception { JmsConnectionFactory factory = new JmsConnectionFactory("amqp: try { factory.createConnection(); fail("Should have thrown exception"); } catch (JMSException jmse) { LOG.debug("Caught Ex -> ", jmse); } factory = new JmsConnectionFactory("amqp: try { factory.createConnection(); fail("Should have thrown exception"); } catch (JMSException jmse) { LOG.debug("Caught Ex -> ", jmse); } }
@Override public Connection createConnection() throws JMSException { return createConnection(getUsername(), getPassword()); }
JmsConnectionFactory extends JNDIStorable implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory { @Override public Connection createConnection() throws JMSException { return createConnection(getUsername(), getPassword()); } }
JmsConnectionFactory extends JNDIStorable implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory { @Override public Connection createConnection() throws JMSException { return createConnection(getUsername(), getPassword()); } JmsConnectionFactory();  JmsConnectionFactory(String username, String password);  JmsConnectionFactory(String remoteURI);  JmsConnectionFactory(String userName, String password, String remoteURI);  JmsConnectionFactory(URI remoteURI);  JmsConnectionFactory(String userName, String password, URI remoteURI); }
JmsConnectionFactory extends JNDIStorable implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory { @Override public Connection createConnection() throws JMSException { return createConnection(getUsername(), getPassword()); } JmsConnectionFactory();  JmsConnectionFactory(String username, String password);  JmsConnectionFactory(String remoteURI);  JmsConnectionFactory(String userName, String password, String remoteURI);  JmsConnectionFactory(URI remoteURI);  JmsConnectionFactory(String userName, String password, URI remoteURI); @Override TopicConnection createTopicConnection(); @Override TopicConnection createTopicConnection(String username, String password); @Override Connection createConnection(); @Override Connection createConnection(String username, String password); @Override QueueConnection createQueueConnection(); @Override QueueConnection createQueueConnection(String username, String password); @Override JMSContext createContext(); @Override JMSContext createContext(int sessionMode); @Override JMSContext createContext(String username, String password); @Override JMSContext createContext(String username, String password, int sessionMode); String getRemoteURI(); void setRemoteURI(String remoteURI); String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); boolean isForceSyncSend(); void setForceSyncSend(boolean forceSyncSend); boolean isForceAsyncSend(); void setForceAsyncSend(boolean forceAsyncSend); boolean isLocalMessagePriority(); void setLocalMessagePriority(boolean localMessagePriority); String getQueuePrefix(); void setQueuePrefix(String queuePrefix); String getTopicPrefix(); void setTopicPrefix(String topicPrefix); boolean isValidatePropertyNames(); void setValidatePropertyNames(boolean validatePropertyNames); long getCloseTimeout(); void setCloseTimeout(long closeTimeout); long getConnectTimeout(); void setConnectTimeout(long connectTimeout); long getSendTimeout(); void setSendTimeout(long sendTimeout); long getRequestTimeout(); void setRequestTimeout(long requestTimeout); JmsPrefetchPolicy getPrefetchPolicy(); void setPrefetchPolicy(JmsPrefetchPolicy prefetchPolicy); JmsRedeliveryPolicy getRedeliveryPolicy(); void setRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy); JmsPresettlePolicy getPresettlePolicy(); void setPresettlePolicy(JmsPresettlePolicy presettlePolicy); JmsMessageIDPolicy getMessageIDPolicy(); void setMessageIDPolicy(JmsMessageIDPolicy messageIDPolicy); JmsDeserializationPolicy getDeserializationPolicy(); void setDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy); synchronized String getClientIDPrefix(); synchronized void setClientIDPrefix(String clientIDPrefix); String getClientID(); void setClientID(String clientID); synchronized void setConnectionIDPrefix(String connectionIDPrefix); ExceptionListener getExceptionListener(); void setExceptionListener(ExceptionListener exceptionListener); boolean isForceAsyncAcks(); void setForceAsyncAcks(boolean forceAsyncAcks); boolean isLocalMessageExpiry(); void setLocalMessageExpiry(boolean localMessageExpiry); boolean isReceiveLocalOnly(); void setReceiveLocalOnly(boolean receiveLocalOnly); boolean isReceiveNoWaitLocalOnly(); void setReceiveNoWaitLocalOnly(boolean receiveNoWaitLocalOnly); boolean isPopulateJMSXUserID(); void setPopulateJMSXUserID(boolean populateJMSXUserID); void setSslContext(SSLContext sslContext); boolean isAwaitClientID(); void setAwaitClientID(boolean awaitClientID); boolean isUseDaemonThread(); void setUseDaemonThread(boolean useDaemonThread); boolean isCloseLinksThatFailOnReconnect(); void setCloseLinksThatFailOnReconnect(boolean closeLinksThatFailOnReconnect); void setExtension(String extensionName, BiFunction<Connection, URI, Object> extension); void setTracing(String tracing); String getTracing(); void setTracer(JmsTracer tracer); JmsTracer getTracer(); static String getDefaultRemoteAddress(); }
JmsConnectionFactory extends JNDIStorable implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory { @Override public Connection createConnection() throws JMSException { return createConnection(getUsername(), getPassword()); } JmsConnectionFactory();  JmsConnectionFactory(String username, String password);  JmsConnectionFactory(String remoteURI);  JmsConnectionFactory(String userName, String password, String remoteURI);  JmsConnectionFactory(URI remoteURI);  JmsConnectionFactory(String userName, String password, URI remoteURI); @Override TopicConnection createTopicConnection(); @Override TopicConnection createTopicConnection(String username, String password); @Override Connection createConnection(); @Override Connection createConnection(String username, String password); @Override QueueConnection createQueueConnection(); @Override QueueConnection createQueueConnection(String username, String password); @Override JMSContext createContext(); @Override JMSContext createContext(int sessionMode); @Override JMSContext createContext(String username, String password); @Override JMSContext createContext(String username, String password, int sessionMode); String getRemoteURI(); void setRemoteURI(String remoteURI); String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); boolean isForceSyncSend(); void setForceSyncSend(boolean forceSyncSend); boolean isForceAsyncSend(); void setForceAsyncSend(boolean forceAsyncSend); boolean isLocalMessagePriority(); void setLocalMessagePriority(boolean localMessagePriority); String getQueuePrefix(); void setQueuePrefix(String queuePrefix); String getTopicPrefix(); void setTopicPrefix(String topicPrefix); boolean isValidatePropertyNames(); void setValidatePropertyNames(boolean validatePropertyNames); long getCloseTimeout(); void setCloseTimeout(long closeTimeout); long getConnectTimeout(); void setConnectTimeout(long connectTimeout); long getSendTimeout(); void setSendTimeout(long sendTimeout); long getRequestTimeout(); void setRequestTimeout(long requestTimeout); JmsPrefetchPolicy getPrefetchPolicy(); void setPrefetchPolicy(JmsPrefetchPolicy prefetchPolicy); JmsRedeliveryPolicy getRedeliveryPolicy(); void setRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy); JmsPresettlePolicy getPresettlePolicy(); void setPresettlePolicy(JmsPresettlePolicy presettlePolicy); JmsMessageIDPolicy getMessageIDPolicy(); void setMessageIDPolicy(JmsMessageIDPolicy messageIDPolicy); JmsDeserializationPolicy getDeserializationPolicy(); void setDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy); synchronized String getClientIDPrefix(); synchronized void setClientIDPrefix(String clientIDPrefix); String getClientID(); void setClientID(String clientID); synchronized void setConnectionIDPrefix(String connectionIDPrefix); ExceptionListener getExceptionListener(); void setExceptionListener(ExceptionListener exceptionListener); boolean isForceAsyncAcks(); void setForceAsyncAcks(boolean forceAsyncAcks); boolean isLocalMessageExpiry(); void setLocalMessageExpiry(boolean localMessageExpiry); boolean isReceiveLocalOnly(); void setReceiveLocalOnly(boolean receiveLocalOnly); boolean isReceiveNoWaitLocalOnly(); void setReceiveNoWaitLocalOnly(boolean receiveNoWaitLocalOnly); boolean isPopulateJMSXUserID(); void setPopulateJMSXUserID(boolean populateJMSXUserID); void setSslContext(SSLContext sslContext); boolean isAwaitClientID(); void setAwaitClientID(boolean awaitClientID); boolean isUseDaemonThread(); void setUseDaemonThread(boolean useDaemonThread); boolean isCloseLinksThatFailOnReconnect(); void setCloseLinksThatFailOnReconnect(boolean closeLinksThatFailOnReconnect); void setExtension(String extensionName, BiFunction<Connection, URI, Object> extension); void setTracing(String tracing); String getTracing(); void setTracer(JmsTracer tracer); JmsTracer getTracer(); static String getDefaultRemoteAddress(); static final String REMOTE_URI_PROP; }