当前位置: 首页>>代码示例>>Java>>正文


Java BrokerService.setSchedulerSupport方法代码示例

本文整理汇总了Java中org.apache.activemq.broker.BrokerService.setSchedulerSupport方法的典型用法代码示例。如果您正苦于以下问题:Java BrokerService.setSchedulerSupport方法的具体用法?Java BrokerService.setSchedulerSupport怎么用?Java BrokerService.setSchedulerSupport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.activemq.broker.BrokerService的用法示例。


在下文中一共展示了BrokerService.setSchedulerSupport方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Before
@Override
public void setUp() throws Exception {
    super.setUp();

    brokerService = new BrokerService();
    brokerService.setPersistent(false);
    brokerService.setUseJmx(false);
    brokerService.setAdvisorySupport(false);
    brokerService.setSchedulerSupport(false);
    TransportConnector connector = brokerService.addConnector("tcp://localhost:0");
    brokerService.start();
    connectionUri = connector.getPublishableConnectString();
    factory = new ActiveMQConnectionFactory(connectionUri);
    pooledFactory = new JmsPoolConnectionFactory();
    pooledFactory.setConnectionFactory(factory);
    pooledFactory.setMaxConnections(1);
    pooledFactory.setBlockIfSessionPoolIsFull(false);
    pooledFactory.setMaximumActiveSessionPerConnection(1);
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:21,代码来源:PooledSessionExhaustionTest.java

示例2: setUp

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
    super.setUp();

    brokerService = new BrokerService();
    brokerService.setPersistent(false);
    brokerService.setUseJmx(false);
    brokerService.setAdvisorySupport(false);
    brokerService.setSchedulerSupport(false);
    TransportConnector connector = brokerService.addConnector("tcp://localhost:0");
    brokerService.start();

    connectionUri = connector.getPublishableConnectString();
    factory = new ActiveMQConnectionFactory(connectionUri);
    pooledFactory = new JmsPoolConnectionFactory();
    pooledFactory.setConnectionFactory(factory);
    pooledFactory.setMaxConnections(1);
    pooledFactory.setBlockIfSessionPoolIsFull(false);
    pooledFactory.setUseAnonymousProducers(false);
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:22,代码来源:PooledSessionNoPublisherCachingTest.java

示例3: setUp

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
    super.setUp();

    brokerService = new BrokerService();
    brokerService.setPersistent(false);
    brokerService.setUseJmx(true);
    brokerService.getManagementContext().setCreateConnector(false);
    brokerService.setAdvisorySupport(false);
    brokerService.setSchedulerSupport(false);
    TransportConnector connector = brokerService.addConnector("tcp://localhost:0");
    brokerService.start();

    connectionUri = connector.getPublishableConnectString();
    factory = new ActiveMQConnectionFactory(connectionUri);
    pooledFactory = new JmsPoolConnectionFactory();
    pooledFactory.setConnectionFactory(factory);
    pooledFactory.setMaxConnections(1);
    pooledFactory.setBlockIfSessionPoolIsFull(false);
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:22,代码来源:PooledSessionTest.java

示例4: setUp

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
    super.setUp();

    brokerService = new BrokerService();
    brokerService.setPersistent(false);
    brokerService.setUseJmx(false);
    brokerService.setSchedulerSupport(false);
    brokerService.setAdvisorySupport(false);
    TransportConnector connector = brokerService.addConnector("tcp://localhost:0");
    brokerService.start();

    connectionUri = connector.getPublishableConnectString();
    factory = new ActiveMQConnectionFactory(connectionUri);
    pooledFactory = new JmsPoolConnectionFactory();
    pooledFactory.setConnectionFactory(factory);
    pooledFactory.setMaxConnections(1);
    pooledFactory.setBlockIfSessionPoolIsFull(true);
    pooledFactory.setBlockIfSessionPoolIsFullTimeout(500);
    pooledFactory.setMaximumActiveSessionPerConnection(1);
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:22,代码来源:PooledSessionExhaustionBlockTimeoutTest.java

示例5: setUp

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
    super.setUp();

    brokerService = new BrokerService();
    brokerService.setUseJmx(false);
    brokerService.setPersistent(false);
    brokerService.setSchedulerSupport(false);
    brokerService.setAdvisorySupport(false);
    TransportConnector connector = brokerService.addConnector("tcp://localhost:0");
    brokerService.start();
    factory = new ActiveMQConnectionFactory("mock:" + connector.getConnectUri() + "?closeAsync=false");
    pooledFactory = new JmsPoolConnectionFactory();
    pooledFactory.setConnectionFactory(factory);
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:17,代码来源:PooledConnectionFactoryWithTemporaryDestinationsTest.java

示例6: setUp

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
    super.setUp();

    brokerService = new BrokerService();
    brokerService.setUseJmx(false);
    brokerService.setPersistent(false);
    brokerService.setSchedulerSupport(false);
    brokerService.setAdvisorySupport(false);
    TransportConnector connector = brokerService.addConnector("tcp://localhost:0");
    brokerService.start();
    factory = new ActiveMQConnectionFactory("mock:" + connector.getConnectUri());
    pooledFactory = new JmsPoolConnectionFactory();
    pooledFactory.setConnectionFactory(factory);
    pooledFactory.setMaxConnections(1);
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:18,代码来源:PooledConnectionExpiryEvictsFromPoolTest.java

示例7: createBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
protected BrokerService createBroker(String name, boolean deleteMessagesOnStartup,
                                     Map<String, Integer> portMap) throws Exception {
  BrokerService brokerService = new BrokerService();
  brokerService.setBrokerName(name);
  brokerService.setDeleteAllMessagesOnStartup(deleteMessagesOnStartup);
  brokerService.setUseJmx(true);
  brokerService.getManagementContext().setCreateConnector(false);
  brokerService.setDataDirectory(DATA_PARENT_DIR + File.separator + "data" + File.separator + name);
  brokerService.setPersistent(false);
  brokerService.setSchedulerSupport(false);
  brokerService.setAdvisorySupport(false);

  ArrayList<BrokerPlugin> plugins = new ArrayList<BrokerPlugin>();
  BrokerPlugin authenticationPlugin = configureAuthentication();
  if (authenticationPlugin != null) {
    plugins.add(authenticationPlugin);
  }

  if (!plugins.isEmpty()) {
    brokerService.setPlugins(plugins.toArray(new BrokerPlugin[0]));
  }

  addAdditionalConnectors(brokerService, portMap);

  return brokerService;
}
 
开发者ID:vert-x3,项目名称:vertx-amqp-bridge,代码行数:27,代码来源:ActiveMQTestBase.java

示例8: beforeTest

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
/**
 * @throws Exception If failed.
 */
@Before
@SuppressWarnings("unchecked")
public void beforeTest() throws Exception {
    grid().<Integer, String>getOrCreateCache(defaultCacheConfiguration());

    broker = new BrokerService();
    broker.setDeleteAllMessagesOnStartup(true);
    broker.setPersistent(false);
    broker.setPersistenceAdapter(null);
    broker.setPersistenceFactory(null);

    PolicyMap plcMap = new PolicyMap();
    PolicyEntry plc = new PolicyEntry();

    plc.setQueuePrefetch(1);

    broker.setDestinationPolicy(plcMap);
    broker.getDestinationPolicy().setDefaultEntry(plc);
    broker.setSchedulerSupport(false);

    broker.start(true);

    connFactory = new ActiveMQConnectionFactory(BrokerRegistry.getInstance().findFirst().getVmConnectorURI());
}
 
开发者ID:apache,项目名称:ignite,代码行数:28,代码来源:IgniteJmsStreamerTest.java

示例9: setUp

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {

   // Setup and start the broker
   broker = new BrokerService();
   broker.setBrokerName(brokerName);
   broker.setPersistent(false);
   broker.setSchedulerSupport(false);
   broker.setUseJmx(false);
   broker.setUseShutdownHook(false);
   broker.addConnector(brokerUrl);

   // Start the broker
   broker.start();
   broker.waitUntilStarted();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:17,代码来源:QueueOptimizedDispatchExceptionTest.java

示例10: createBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
protected BrokerService createBroker(boolean delete) throws Exception {
   File schedulerDirectory = new File("target/scheduler");
   if (delete) {
      IOHelper.mkdirs(schedulerDirectory);
      IOHelper.deleteChildren(schedulerDirectory);
   }

   BrokerService answer = new BrokerService();
   answer.setPersistent(isPersistent());
   answer.setDeleteAllMessagesOnStartup(true);
   answer.setDataDirectory("target");
   answer.setSchedulerDirectoryFile(schedulerDirectory);
   answer.setSchedulerSupport(true);
   answer.setUseJmx(isUseJmx());
   return answer;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:17,代码来源:JobSchedulerTestSupport.java

示例11: createBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
protected BrokerService createBroker() throws Exception {
    BrokerService brokerService = new BrokerService();
    brokerService.setDeleteAllMessagesOnStartup(true);
    brokerService.setPersistent(false);
    brokerService.setUseJmx(false);
    brokerService.setAdvisorySupport(false);
    brokerService.setSchedulerSupport(false);

    connectionURI = brokerService.addConnector("amqp://localhost:0").getPublishableConnectString();

    brokerService.start();
    brokerService.waitUntilStarted();

    return brokerService;
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:16,代码来源:QpidJmsPoolTestSupport.java

示例12: configureBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
protected void configureBroker(BrokerService brokerService) throws Exception {
    brokerService.setBrokerName("testbroker1");
    brokerService.setUseJmx(false);
    brokerService.setPersistent(false);
    brokerService.setAdvisorySupport(false);
    brokerService.setSchedulerSupport(false);

    TransportConnector connector = new TransportConnector();
    connector.setUri(new URI("tcp://localhost:0"));
    connector.setName(testName.getMethodName());

    brokerService.addConnector(connector);
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:14,代码来源:PooledConnectionTempDestCleanupTest.java

示例13: createBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
protected String createBroker() throws Exception {
    brokerService = new BrokerService();
    brokerService.setBrokerName("PooledConnectionSessionCleanupTestBroker");
    brokerService.setUseJmx(true);
    brokerService.getManagementContext().setCreateConnector(false);
    brokerService.setPersistent(false);
    brokerService.setSchedulerSupport(false);
    brokerService.setAdvisorySupport(false);
    TransportConnector connector = brokerService.addConnector("tcp://0.0.0.0:61626");
    brokerService.start();
    brokerService.waitUntilStarted();

    return "failover:(" + connector.getPublishableConnectString() + ")?maxReconnectAttempts=5";
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:16,代码来源:PooledConnectionFailoverTest.java

示例14: setUp

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
/**
 * Prepare to run a test case: create, configure, and start the embedded
 * broker, as well as creating the client connections to the broker.
 */
@Override
@Before
public void setUp() throws java.lang.Exception {
    super.setUp();

    brokerService = new BrokerService();
    brokerService.setBrokerName("PooledConnectionSessionCleanupTestBroker");
    brokerService.setUseJmx(true);
    brokerService.getManagementContext().setCreateConnector(false);
    brokerService.setPersistent(false);
    brokerService.setSchedulerSupport(false);
    brokerService.setAdvisorySupport(false);
    brokerService.start();
    brokerService.waitUntilStarted();

    // Create the ActiveMQConnectionFactory and the JmsPoolConnectionFactory.
    // Set a long idle timeout on the pooled connections to better show the
    // problem of holding onto created resources on close.
    directConnFact = new ActiveMQConnectionFactory(brokerService.getVmConnectorURI());
    pooledConnFact = new JmsPoolConnectionFactory();
    pooledConnFact.setConnectionFactory(directConnFact);
    pooledConnFact.setIdleTimeout((int)TimeUnit.MINUTES.toMillis(60));
    pooledConnFact.setMaxConnections(1);

    // Prepare the connections
    directConn1 = directConnFact.createConnection();
    directConn1.start();
    directConn2 = directConnFact.createConnection();
    directConn2.start();

    // The pooled Connections should have the same underlying connection
    pooledConn1 = pooledConnFact.createConnection();
    pooledConn1.start();
    pooledConn2 = pooledConnFact.createConnection();
    pooledConn2.start();
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:41,代码来源:PooledConnectionSessionCleanupTest.java

示例15: setUp

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
    super.setUp();

    brokerService = new BrokerService();
    brokerService.setDeleteAllMessagesOnStartup(true);
    brokerService.setPersistent(false);
    brokerService.setUseJmx(false);
    brokerService.setAdvisorySupport(false);
    brokerService.setSchedulerSupport(false);
    brokerService.start();
    brokerService.waitUntilStarted();
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:15,代码来源:PooledConnectionExpiredConnectionsUnderLoad.java


注:本文中的org.apache.activemq.broker.BrokerService.setSchedulerSupport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。