Search in sources :

Example 1 with SystemUsage

use of org.apache.activemq.usage.SystemUsage in project quickstarts by jboss-switchyard.

the class JCAOutboundBindingTest method startActiveMQBroker.

public static void startActiveMQBroker() throws Exception {
    _broker = new BrokerService();
    _broker.setBrokerName("default");
    _broker.setUseJmx(false);
    _broker.setPersistent(false);
    _broker.setDataDirectoryFile(ACTIVEMQ_DATA_DIR);
    _broker.addConnector(ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL);
    SystemUsage systemUsage = _broker.getSystemUsage();
    systemUsage.getMemoryUsage().setLimit(MEMORY_STORE_USAGE_LIMIT);
    systemUsage.getTempUsage().setLimit(TEMP_STORE_USAGE_LIMIT);
    _broker.start();
}
Also used : SystemUsage(org.apache.activemq.usage.SystemUsage) BrokerService(org.apache.activemq.broker.BrokerService)

Example 2 with SystemUsage

use of org.apache.activemq.usage.SystemUsage in project quickstarts by jboss-switchyard.

the class JCAInflowBindingTest method startActiveMQBroker.

public static void startActiveMQBroker() throws Exception {
    _broker = new BrokerService();
    _broker.setBrokerName("default");
    _broker.setUseJmx(false);
    _broker.setPersistent(false);
    _broker.setDataDirectoryFile(ACTIVEMQ_DATA_DIR);
    _broker.addConnector(ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL);
    SystemUsage systemUsage = _broker.getSystemUsage();
    systemUsage.getMemoryUsage().setLimit(MEMORY_STORE_USAGE_LIMIT);
    systemUsage.getTempUsage().setLimit(TEMP_STORE_USAGE_LIMIT);
    _broker.start();
}
Also used : SystemUsage(org.apache.activemq.usage.SystemUsage) BrokerService(org.apache.activemq.broker.BrokerService)

Aggregations

BrokerService (org.apache.activemq.broker.BrokerService)2 SystemUsage (org.apache.activemq.usage.SystemUsage)2