congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
DefaultConnectionProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
DefaultConnectionProperties
in
org.apache.activemq.artemis.jms.client

Best Java code snippets using org.apache.activemq.artemis.jms.client.DefaultConnectionProperties (Showing top 9 results out of 315)

origin: wildfly/wildfly

  public static void initialize() {
   String host = getProperty("localhost", AMQ_HOST, PREFIX + AMQ_HOST);
   String port = getProperty("61616", AMQ_PORT, PREFIX + AMQ_PORT);
   DEFAULT_BROKER_HOST = host;
   DEFAULT_BROKER_PORT = Integer.parseInt(port);
   String url = getProperty("tcp://" + host + ":" + port, PREFIX + BROKER_BIND_URL, BROKER_BIND_URL);
   DEFAULT_USER = getProperty(null, AMQ_USER, PREFIX + AMQ_USER);
   DEFAULT_PASSWORD = getProperty(null, AMQ_PASSWORD, PREFIX + AMQ_PASSWORD);

   DEFAULT_BROKER_BIND_URL = url;
   // TODO: improve this once we implement failover:// as ActiveMQ5 does
   DEFAULT_BROKER_URL = DEFAULT_BROKER_BIND_URL;
  }
}
origin: apache/activemq-artemis

@After
public void clearProperty() {
 if (originalAmqUser == null) {
   System.clearProperty(DefaultConnectionProperties.AMQ_USER);
 } else {
   System.setProperty(DefaultConnectionProperties.AMQ_USER, originalAmqUser);
 }
 if (originalAmqPassword == null) {
   System.clearProperty(DefaultConnectionProperties.AMQ_PASSWORD);
 } else {
   System.setProperty(DefaultConnectionProperties.AMQ_PASSWORD, originalAmqPassword);
 }
 if (originalBrokerBindUrl == null) {
   System.clearProperty(DefaultConnectionProperties.BROKER_BIND_URL);
 } else {
   System.setProperty(DefaultConnectionProperties.BROKER_BIND_URL, originalBrokerBindUrl);
 }
 DefaultConnectionProperties.initialize();
}
origin: apache/activemq-artemis

/**
* Login with valid user and password
* Should allow
*/
@Test
public void testLoginValidUserAndPasswordSystemProperty() throws Exception {
 System.setProperty(DefaultConnectionProperties.AMQ_USER, "guest");
 System.setProperty(DefaultConnectionProperties.AMQ_PASSWORD, "guest");
 DefaultConnectionProperties.initialize();
 ConnectionFactory cf = new ActiveMQConnectionFactory();
 Connection conn = addConnection(cf.createConnection());
}
origin: apache/activemq-artemis

  public static void initialize() {
   String host = getProperty("localhost", AMQ_HOST, PREFIX + AMQ_HOST);
   String port = getProperty("61616", AMQ_PORT, PREFIX + AMQ_PORT);
   DEFAULT_BROKER_HOST = host;
   DEFAULT_BROKER_PORT = Integer.parseInt(port);
   String url = getProperty("tcp://" + host + ":" + port, PREFIX + BROKER_BIND_URL, BROKER_BIND_URL);
   DEFAULT_USER = getProperty(null, AMQ_USER, PREFIX + AMQ_USER);
   DEFAULT_PASSWORD = getProperty(null, AMQ_PASSWORD, PREFIX + AMQ_PASSWORD);

   DEFAULT_BROKER_BIND_URL = url;
   // TODO: improve this once we implement failover:// as ActiveMQ5 does
   DEFAULT_BROKER_URL = DEFAULT_BROKER_BIND_URL;
  }
}
origin: apache/activemq-artemis

/**
* Login with valid user and password
* Should allow
*/
@Test
public void testLoginValidUserAndPasswordSystemPropertyWithAdditionalProperties() throws Exception {
 System.setProperty(DefaultConnectionProperties.AMQ_USER, "guest");
 System.setProperty(DefaultConnectionProperties.AMQ_PASSWORD, "guest");
 System.setProperty(DefaultConnectionProperties.BROKER_BIND_URL, "tcp://localhost:61616?compressLargeMessage=true");
 DefaultConnectionProperties.initialize();
 ConnectionFactory cf = new ActiveMQConnectionFactory();
 Connection conn = addConnection(cf.createConnection());
 Assert.assertTrue(((ActiveMQConnectionFactory) cf).isCompressLargeMessage());
}
origin: apache/activemq-artemis

  public static void initialize() {
   String host = getProperty("localhost", AMQ_HOST, PREFIX + AMQ_HOST);
   String port = getProperty("61616", AMQ_PORT, PREFIX + AMQ_PORT);
   DEFAULT_BROKER_HOST = host;
   DEFAULT_BROKER_PORT = Integer.parseInt(port);
   String url = getProperty("tcp://" + host + ":" + port, PREFIX + BROKER_BIND_URL, BROKER_BIND_URL);
   DEFAULT_USER = getProperty(null, AMQ_USER, PREFIX + AMQ_USER);
   DEFAULT_PASSWORD = getProperty(null, AMQ_PASSWORD, PREFIX + AMQ_PASSWORD);

   DEFAULT_BROKER_BIND_URL = url;
   // TODO: improve this once we implement failover:// as ActiveMQ5 does
   DEFAULT_BROKER_URL = DEFAULT_BROKER_BIND_URL;
  }
}
origin: apache/activemq-artemis

/**
* Login with valid user and invalid password
* Should allow
*/
@Test
public void testLoginValidUserInvalidPasswordSystemProperty() throws Exception {
 System.setProperty(DefaultConnectionProperties.AMQ_USER, "guest");
 System.setProperty(DefaultConnectionProperties.AMQ_PASSWORD, "not.the.valid.password");
 DefaultConnectionProperties.initialize();
 try {
   ConnectionFactory cf = new ActiveMQConnectionFactory();
   Connection conn1 = addConnection(cf.createConnection());
   ProxyAssertSupport.fail();
 } catch (JMSSecurityException e) {
   // Expected
 }
}
origin: org.apache.activemq/artemis-jms-client-all

  public static void initialize() {
   String host = getProperty("localhost", AMQ_HOST, PREFIX + AMQ_HOST);
   String port = getProperty("61616", AMQ_PORT, PREFIX + AMQ_PORT);
   DEFAULT_BROKER_HOST = host;
   DEFAULT_BROKER_PORT = Integer.parseInt(port);
   String url = getProperty("tcp://" + host + ":" + port, PREFIX + BROKER_BIND_URL, BROKER_BIND_URL);
   DEFAULT_USER = getProperty(null, AMQ_USER, PREFIX + AMQ_USER);
   DEFAULT_PASSWORD = getProperty(null, AMQ_PASSWORD, PREFIX + AMQ_PASSWORD);

   DEFAULT_BROKER_BIND_URL = url;
   // TODO: improve this once we implement failover:// as ActiveMQ5 does
   DEFAULT_BROKER_URL = DEFAULT_BROKER_BIND_URL;
  }
}
origin: org.jboss.eap/wildfly-client-all

  public static void initialize() {
   String host = getProperty("localhost", AMQ_HOST, PREFIX + AMQ_HOST);
   String port = getProperty("61616", AMQ_PORT, PREFIX + AMQ_PORT);
   DEFAULT_BROKER_HOST = host;
   DEFAULT_BROKER_PORT = Integer.parseInt(port);
   String url = getProperty("tcp://" + host + ":" + port, PREFIX + BROKER_BIND_URL, BROKER_BIND_URL);
   DEFAULT_USER = getProperty(null, AMQ_USER, PREFIX + AMQ_USER);
   DEFAULT_PASSWORD = getProperty(null, AMQ_PASSWORD, PREFIX + AMQ_PASSWORD);

   DEFAULT_BROKER_BIND_URL = url;
   // TODO: improve this once we implement failover:// as ActiveMQ5 does
   DEFAULT_BROKER_URL = DEFAULT_BROKER_BIND_URL;
  }
}
org.apache.activemq.artemis.jms.clientDefaultConnectionProperties

Javadoc

This class will provide default properties for constructors

Name Default Value
AMQ_HOST or org.apache.activemq.AMQ_HOST localhost
AMQ_PORT or org.apache.activemq.AMQ_PORT 61616
BROKER_BIND_URL or org.apache.activemq.BROKER_BIND_URL tcp://${AMQ_HOST}:${AMQ_PORT}
AMQ_USER or org.apache.activemq.AMQ_USER null
AMQ_PASSWORD or org.apache.activemq.AMQ_PASSWORD null

Most used methods

  • getProperty
  • initialize

Popular in Java

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now