String testConfig = saveTestConfiguration(port, testConfiguration);
if (_brokerType.equals(BrokerType.INTERNAL) && !existingInternalBroker())
{
setSystemProperty(BrokerProperties.PROPERTY_USE_CUSTOM_RMI_SOCKET_FACTORY, "false");
BrokerOptions options = new BrokerOptions();
options.setConfigurationStoreType(_brokerStoreType);
options.setConfigurationStoreLocation(testConfig);
options.setManagementMode(managementMode);
if (managementMode)
{
options.setManagementModePassword(MANAGEMENT_MODE_PASSWORD);
}
//Set the log config file, relying on the log4j.configuration system property
//set on the JVM by the JUnit runner task in module.xml.
options.setLogConfigFileLocation(_logConfigFile.getAbsolutePath());
Broker broker = new Broker();
_logger.info("Starting internal broker (same JVM)");
broker.startup(options);