Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- public class ArtemisFactory {
- private static final Logger log = LoggerFactory.getLogger(ArtemisFactory.class);
- public static ActiveMQConnectionFactory connectionFactory(String user, String password, String url, String clientId, int timeout) {
- ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(url, user, password);
- cf.setClientID(clientId);
- cf.setEnableSharedClientID(true);
- cf.setCacheDestinations(true);
- cf.setEnable1xPrefixes(true);
- return cf;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement