org.fabric3.binding.activemq.provider.ActiveMQDefaultConnectionFactoryBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric3-activemq Show documentation
Show all versions of fabric3-activemq Show documentation
Provides support for running an embedded ActiveMQ broker
The newest version!
package org.fabric3.binding.activemq.provider;
import java.net.URI;
import org.oasisopen.sca.annotation.EagerInit;
import org.oasisopen.sca.annotation.Reference;
import org.fabric3.binding.jms.spi.runtime.connection.ConnectionFactoryConfiguration;
import org.fabric3.binding.jms.spi.runtime.connection.ConnectionFactoryType;
import org.fabric3.binding.jms.spi.runtime.provider.DefaultConnectionFactoryBuilder;
/**
* Creates default connection factory configurations for ActiveMQ.
*/
@EagerInit
public class ActiveMQDefaultConnectionFactoryBuilder implements DefaultConnectionFactoryBuilder {
private URI defaultBrokerName;
public ActiveMQDefaultConnectionFactoryBuilder(@Reference BrokerHelper helper) {
this.defaultBrokerName = URI.create(helper.getDefaultBrokerName());
}
public ConnectionFactoryConfiguration createDefaultFactory(String name, ConnectionFactoryType type) {
ActiveMQConnectionFactoryConfiguration configuration = new ActiveMQConnectionFactoryConfiguration(name);
configuration.setBrokerUri(defaultBrokerName);
configuration.setType(type);
return configuration;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy