@Override protected Object createEntry(String name) { return ActiveMQJMSClient.createQueue(name); } });
@Override protected Object createEntry(String name) { return ActiveMQJMSClient.createTopic(name); } });
@Override public int getFactoryType() { return JMSFactoryType.QUEUE_CF.intValue(); } }
@Override public ActiveMQConnectionFactory internalNewObject(URI uri, Map<String, String> query, String name) throws Exception { JMSConnectionOptions options = newConectionOptions(uri, query); DiscoveryGroupConfiguration dcConfig = JGroupsServerLocatorSchema.getDiscoveryGroupConfiguration(uri, query, name); ActiveMQConnectionFactory factory; if (options.isHa()) { factory = ActiveMQJMSClient.createConnectionFactoryWithHA(dcConfig, options.getFactoryTypeEnum()); } else { factory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(dcConfig, options.getFactoryTypeEnum()); } return BeanSupport.setData(uri, factory, query); }
JMSFactoryType providedFactoryType = getFactoryType(providerUrl); if (providedFactoryType == null) { for (JMSFactoryType factoryType : JMSFactoryType.values()) { String factoryName = factoryType.connectionFactoryInterface().getSimpleName(); data.put(factoryName, createConnectionFactory(providerUrl, Collections.singletonMap("type", factoryType.toString()), factoryName)); String factoryName = providedFactoryType.connectionFactoryInterface().getSimpleName(); data.put(factoryName, createConnectionFactory(providerUrl, factoryName));
@Override protected ActiveMQConnectionFactory internalNewObject(URI uri, Map<String, String> query, String name) throws Exception { JMSConnectionOptions options = newConectionOptions(uri, query); ActiveMQConnectionFactory factory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(options.getFactoryTypeEnum(), InVMTransportConfigurationSchema.createTransportConfiguration(uri, query, name, "org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory")); return BeanSupport.setData(uri, factory, query); }
/** * Create an ActiveMQConnectionFactory which creates session factories from a set of live servers, no HA backup information is propagated to the client * * The UDP address and port are used to listen for live servers in the cluster * * @param groupConfiguration * @param jmsFactoryType * @return the ActiveMQConnectionFactory */ public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(final DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType) { return jmsFactoryType.createConnectionFactoryWithoutHA(groupConfiguration); }
/** * Create an ActiveMQConnectionFactory which will receive cluster topology updates from the cluster * as servers leave or join and new backups are appointed or removed. * <p> * The initial list of servers supplied in this method is simply to make an initial connection to * the cluster, once that connection is made, up to date cluster topology information is * downloaded and automatically updated whenever the cluster topology changes. If the topology * includes backup servers that information is also propagated to the client so that it can know * which server to failover onto in case of live server failure. * * @param jmsFactoryType * @param initialServers The initial set of servers used to make a connection to the cluster. * Each one is tried in turn until a successful connection is made. Once a connection * is made, the cluster topology is downloaded and the rest of the list is ignored. * @return the ActiveMQConnectionFactory */ public static ActiveMQConnectionFactory createConnectionFactoryWithHA(JMSFactoryType jmsFactoryType, final TransportConfiguration... initialServers) { return jmsFactoryType.createConnectionFactoryWithHA(initialServers); }
public String getType() { return factoryType.toString(); }
@Override protected ActiveMQConnectionFactory internalNewObject(URI uri, Map<String, String> query, String name) throws Exception { JMSConnectionOptions options = newConectionOptions(uri, query); List<TransportConfiguration> configurations = TCPTransportConfigurationSchema.getTransportConfigurations(uri, query, TransportConstants.ALLOWABLE_CONNECTOR_KEYS, name, NettyConnectorFactory.class.getName()); TransportConfiguration[] tcs = new TransportConfiguration[configurations.size()]; configurations.toArray(tcs); ActiveMQConnectionFactory factory; if (options.isHa()) { factory = ActiveMQJMSClient.createConnectionFactoryWithHA(options.getFactoryTypeEnum(), tcs); } else { factory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(options.getFactoryTypeEnum(), tcs); } return BeanSupport.setData(uri, factory, query); }
/** * Factory method to create new Queue instances */ protected Queue createQueue(String name) { return ActiveMQJMSClient.createQueue(name); }
/** * Factory method to create new Topic instances */ protected Topic createTopic(String name) { return ActiveMQJMSClient.createTopic(name); }
@Override public int getFactoryType() { return JMSFactoryType.TOPIC_CF.intValue(); } }
/** * Create an ActiveMQConnectionFactory which creates session factories using a static list of * transportConfigurations. * <p> * The ActiveMQConnectionFactory is not updated automatically as the cluster topology changes, and * no HA backup information is propagated to the client * * @param jmsFactoryType * @param transportConfigurations * @return the ActiveMQConnectionFactory */ public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(JMSFactoryType jmsFactoryType, final TransportConfiguration... transportConfigurations) { return jmsFactoryType.createConnectionFactoryWithoutHA(transportConfigurations); }
/** * Creates an ActiveMQConnectionFactory that receives cluster topology updates from the cluster as * servers leave or join and new backups are appointed or removed. * <p> * The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP * broadcasts which contain connection information for members of the cluster. The broadcasted * connection information is simply used to make an initial connection to the cluster, once that * connection is made, up to date cluster topology information is downloaded and automatically * updated whenever the cluster topology changes. If the topology includes backup servers that * information is also propagated to the client so that it can know which server to failover onto * in case of live server failure. * * @param groupConfiguration * @param jmsFactoryType * @return the ActiveMQConnectionFactory */ public static ActiveMQConnectionFactory createConnectionFactoryWithHA(final DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType) { return jmsFactoryType.createConnectionFactoryWithHA(groupConfiguration); }
@Override public ActiveMQConnectionFactory internalNewObject(URI uri, Map<String, String> query, String name) throws Exception { JMSConnectionOptions options = newConectionOptions(uri, query); DiscoveryGroupConfiguration dgc = UDPServerLocatorSchema.getDiscoveryGroupConfiguration(uri, query, getHost(uri), getPort(uri), name); ActiveMQConnectionFactory factory; if (options.isHa()) { factory = ActiveMQJMSClient.createConnectionFactoryWithHA(dgc, options.getFactoryTypeEnum()); } else { factory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(dgc, options.getFactoryTypeEnum()); } return BeanSupport.setData(uri, factory, query); }
@Override public int getFactoryType() { return JMSFactoryType.TOPIC_XA_CF.intValue(); } }
@Override public int getFactoryType() { return JMSFactoryType.QUEUE_XA_CF.intValue(); }
@Override public int getFactoryType() { return JMSFactoryType.XA_CF.intValue(); }
public int getFactoryType() { return JMSFactoryType.CF.intValue(); }