org.apache.activemq.ActiveMQConnectionFactory.setProperties()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中org.apache.activemq.ActiveMQConnectionFactory.setProperties()方法的一些代码示例,展示了ActiveMQConnectionFactory.setProperties()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ActiveMQConnectionFactory.setProperties()方法的具体详情如下:
包路径:org.apache.activemq.ActiveMQConnectionFactory
类名称:ActiveMQConnectionFactory
方法名:setProperties

ActiveMQConnectionFactory.setProperties介绍

暂无

代码示例

代码示例来源:origin: apache/activemq

/**
 * Factory method to create a new connection factory from the given
 * environment
 */
protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException {
  ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory();
  Properties properties = new Properties();
  properties.putAll(environment);
  answer.setProperties(properties);
  return answer;
}

代码示例来源:origin: apache/activemq

/**
   * Factory method to create a new connection factory from the given
   * environment
   */
  @Override
  protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException {
    ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXASslConnectionFactory() : new ActiveMQSslConnectionFactory();
    Properties properties = new Properties();
    properties.putAll(environment);
    answer.setProperties(properties);
    return answer;
  }
}

代码示例来源:origin: org.apache.activemq/activemq-all

/**
   * Factory method to create a new connection factory from the given
   * environment
   */
  @Override
  protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException {
    ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXASslConnectionFactory() : new ActiveMQSslConnectionFactory();
    Properties properties = new Properties();
    properties.putAll(environment);
    answer.setProperties(properties);
    return answer;
  }
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

/**
 * Factory method to create a new connection factory from the given
 * environment
 */
protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException {
  ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory();
  Properties properties = new Properties();
  properties.putAll(environment);
  answer.setProperties(properties);
  return answer;
}

代码示例来源:origin: org.apache.activemq/activemq-client

/**
 * Factory method to create a new connection factory from the given
 * environment
 */
protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException {
  ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory();
  Properties properties = new Properties();
  properties.putAll(environment);
  answer.setProperties(properties);
  return answer;
}

代码示例来源:origin: org.apache.activemq/activemq-all

/**
 * Factory method to create a new connection factory from the given
 * environment
 */
protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException {
  ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory();
  Properties properties = new Properties();
  properties.putAll(environment);
  answer.setProperties(properties);
  return answer;
}

代码示例来源:origin: org.apache.activemq/activemq-client

/**
   * Factory method to create a new connection factory from the given
   * environment
   */
  @Override
  protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException {
    ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXASslConnectionFactory() : new ActiveMQSslConnectionFactory();
    Properties properties = new Properties();
    properties.putAll(environment);
    answer.setProperties(properties);
    return answer;
  }
}

代码示例来源:origin: pierre/meteo

/**
 * Factory method to create a new connection factory from the given
 * environment
 */
protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException {
  ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory();
  Properties properties = new Properties();
  properties.putAll(environment);
  answer.setProperties(properties);
  return answer;
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

/**
   * Factory method to create a new connection factory from the given
   * environment
   */
  @Override
  protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException {
    ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXASslConnectionFactory() : new ActiveMQSslConnectionFactory();
    Properties properties = new Properties();
    properties.putAll(environment);
    answer.setProperties(properties);
    return answer;
  }
}

代码示例来源:origin: org.codehaus.fabric3/fabric3-activemq

public ConnectionFactory create(ActiveMQConnectionFactoryConfiguration configuration) throws ConnectionFactoryCreationException {
  ConnectionFactoryType type = configuration.getType();
  switch (type) {
  case XA:
    ActiveMQXAConnectionFactory xaFactory = new ActiveMQXAConnectionFactory(getUri(configuration));
    xaFactory.setProperties(configuration.getFactoryProperties());
    return xaFactory;
  default:
    // default to local pooled
    ActiveMQConnectionFactory wrapped = new ActiveMQConnectionFactory(getUri(configuration));
    wrapped.setProperties(configuration.getFactoryProperties());
    return new PooledConnectionFactory(wrapped);
  }
}

代码示例来源:origin: com.carecon.fabric3/fabric3-activemq

public ConnectionFactory create(ConnectionFactoryConfiguration configuration) throws Fabric3Exception {
  ConnectionFactoryType type = configuration.getType();
  String clientId = configuration.getClientId();
  switch (type) {
    case XA:
      ActiveMQXAConnectionFactory xaFactory = new ActiveMQXAConnectionFactory(getUri(configuration));
      xaFactory.setProperties(configuration.getFactoryProperties());
      xaFactory.setUserName(configuration.getUsername());
      xaFactory.setPassword(configuration.getPassword());
      if (clientId != null) {
        // since a client id is specified (possibly for a durable subscription), create a singleton connection so the connection id is unique
        setClientId(clientId, xaFactory);
        return new XaSingletonConnectionFactory(xaFactory, monitor);
      }
      return xaFactory;
    default:
      // default to local pooled
      ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(getUri(configuration));
      factory.setProperties(configuration.getFactoryProperties());
      factory.setUserName(configuration.getUsername());
      factory.setPassword(configuration.getPassword());
      if (clientId != null) {
        // since a client id is specified (possibly for a durable subscription), create a singleton connection so the connection id is unique
        setClientId(clientId, factory);
        return new SingletonConnectionFactory(factory, monitor);
      }
      return factory;
  }
}

相关文章

微信公众号

最新文章

更多

ActiveMQConnectionFactory类方法