use of org.apache.activemq.broker.BrokerService in project activemq-artemis by apache.
the class SslContextBrokerServiceTest method setUp.
@Override
protected void setUp() throws Exception {
Thread.currentThread().setContextClassLoader(SslContextBrokerServiceTest.class.getClassLoader());
context = new ClassPathXmlApplicationContext("org/apache/activemq/transport/tcp/activemq-ssl.xml");
Map<String, BrokerService> beansOfType = context.getBeansOfType(BrokerService.class);
broker = beansOfType.values().iterator().next();
connector = broker.getTransportConnectors().get(0);
}
use of org.apache.activemq.broker.BrokerService in project activemq-artemis by apache.
the class SslContextNBrokerServiceTest method getBroker.
private BrokerService getBroker(String name) {
BrokerService result = null;
Iterator<BrokerService> iterator = beansOfType.values().iterator();
while (iterator.hasNext()) {
BrokerService candidate = iterator.next();
if (candidate.getBrokerName().equals(name)) {
result = candidate;
break;
}
}
return result;
}
use of org.apache.activemq.broker.BrokerService in project activemq-artemis by apache.
the class AdvisoryDuplexNetworkBridgeTest method createBroker1.
@Override
public void createBroker1() throws Exception {
broker1 = new BrokerService();
broker1.setBrokerName("broker1");
broker1.addConnector("tcp://localhost:61617");
broker1.setUseJmx(false);
broker1.setPersistent(false);
broker1.start();
broker1.waitUntilStarted();
}
use of org.apache.activemq.broker.BrokerService in project activemq-artemis by apache.
the class DbRestartJDBCQueueTest method setUp.
@Override
protected void setUp() throws Exception {
setAutoFail(true);
topic = false;
verbose = true;
// startup db
sharedDs = (EmbeddedDataSource) DataSourceServiceSupport.createDataSource(IOHelper.getDefaultDataDirectory());
broker = new BrokerService();
DefaultIOExceptionHandler handler = new DefaultIOExceptionHandler();
handler.setIgnoreSQLExceptions(false);
handler.setStopStartConnectors(true);
broker.setIoExceptionHandler(handler);
broker.addConnector("tcp://localhost:0");
broker.setUseJmx(false);
broker.setPersistent(true);
broker.setDeleteAllMessagesOnStartup(true);
JDBCPersistenceAdapter persistenceAdapter = new JDBCPersistenceAdapter();
persistenceAdapter.setDataSource(sharedDs);
persistenceAdapter.setUseLock(false);
persistenceAdapter.setLockKeepAlivePeriod(500);
persistenceAdapter.getLocker().setLockAcquireSleepInterval(500);
broker.setPersistenceAdapter(persistenceAdapter);
broker.start();
super.setUp();
}
use of org.apache.activemq.broker.BrokerService in project activemq-artemis by apache.
the class QueueMasterSlaveSingleUrlTest method createMaster.
@Override
protected void createMaster() throws Exception {
master = new BrokerService();
master.setBrokerName("shared-master");
configureSharedPersistenceAdapter(master);
master.addConnector(brokerUrl);
master.start();
}
Aggregations