Examples of SingleConnectionFactory


Examples of com.zanox.rabbiteasy.SingleConnectionFactory

   
    @Before
    public void before() throws Exception {
        brokerSetup = new TestBrokerSetup();
       
        connectionFactory = new SingleConnectionFactory();
        connectionFactory.setHost(brokerSetup.getHost());
        connectionFactory.setPort(brokerSetup.getPort());
        publisher = new SimplePublisher(connectionFactory);
    }
View Full Code Here

Examples of com.zanox.rabbiteasy.SingleConnectionFactory

    @Before
    public void before() throws Exception {
        brokerAssert = new BrokerAssert();
        brokerSetup = new BrokerSetup();
        brokerSetup.declareQueueWithDeadLettering(TestBrokerSetup.TEST_QUEUE);
        connectionFactory = new SingleConnectionFactory();
        connectionFactory.setHost(brokerSetup.getHost());
        connectionFactory.setPort(brokerSetup.getPort());
    }
View Full Code Here

Examples of com.zanox.rabbiteasy.SingleConnectionFactory

*/
public class ConnectionFactoryProvider {

    @Produces @Singleton
    public ConnectionFactory provideConnectionFactory() {
        return new SingleConnectionFactory();
    }
View Full Code Here

Examples of com.zanox.rabbiteasy.SingleConnectionFactory

    @Before
    public void beforeAll() throws Exception {
        brokerAssert = new BrokerAssert();
        brokerSetup = new TestBrokerSetup();
        brokerSetup.prepareSimpleTest();
        singleConnectionFactory = new SingleConnectionFactory();
        singleConnectionFactory.setHost(brokerSetup.getHost());
        singleConnectionFactory.setPort(brokerSetup.getPort());
    }
View Full Code Here

Examples of org.springframework.amqp.rabbit.connection.SingleConnectionFactory

    super();
  }

  @Bean
  public ConnectionFactory connectionFactory() {
    SingleConnectionFactory connectionFactory = new SingleConnectionFactory("localhost");
    connectionFactory.setUsername("guest");
    connectionFactory.setPassword("guest");
    return connectionFactory;
  }
View Full Code Here

Examples of org.springframework.erlang.connection.SingleConnectionFactory

  public void otpTemplate() throws UnknownHostException {

    String selfNodeName = "rabbit-monitor";
    String peerNodeName = NODE_NAME;

    SingleConnectionFactory cf = new SingleConnectionFactory(selfNodeName, peerNodeName);

    cf.afterPropertiesSet();
    ErlangTemplate template = new ErlangTemplate(cf);
    template.afterPropertiesSet();

    long number = (Long) template.executeAndConvertRpc("erlang", "abs", -161803399);
    Assert.assertEquals(161803399, number);

    cf.destroy();

  }
View Full Code Here

Examples of org.springframework.jms.connection.SingleConnectionFactory

        if (wrappedConnectionFactory == null) {
            if (connectionFactory == null) {
                connectionFactory = JMSFactory.getConnectionFactoryFromJndi(this);
            }
            if (wrapInSingleConnectionFactory && !(connectionFactory instanceof SingleConnectionFactory)) {
                SingleConnectionFactory scf;
                if (useJms11) {
                    if (connectionFactory instanceof XAConnectionFactory) {
                        scf = new XASingleConnectionFactory(connectionFactory);
                    } else {
                        scf = new SingleConnectionFactory(connectionFactory);
                    }
                } else {
                    scf = new SingleConnectionFactory102(connectionFactory, pubSubDomain);
                }
                if (getDurableSubscriptionClientId() != null) {
                    scf.setClientId(getDurableSubscriptionClientId());
                }
                scf.setReconnectOnException(isReconnectOnException());
                wrappedConnectionFactory = scf;
            } else {
                wrappedConnectionFactory = connectionFactory;
            }
        }
View Full Code Here

Examples of org.springframework.jms.connection.SingleConnectionFactory

            UserCredentialsConnectionFactoryAdapter uccf = new UserCredentialsConnectionFactoryAdapter();
            uccf.setUsername(userName);
            uccf.setPassword(password);
            uccf.setTargetConnectionFactory(connectionFactory);

            SingleConnectionFactory scf = new SingleConnectionFactory();
            scf.setTargetConnectionFactory(uccf);
            return scf;
        } catch (NamingException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

Examples of org.springframework.jms.connection.SingleConnectionFactory

        if (wrappedConnectionFactory == null) {
            if (connectionFactory == null) {
                connectionFactory = JMSFactory.getConnectionFactoryFromJndi(this);
            }
            if (wrapInSingleConnectionFactory && !(connectionFactory instanceof SingleConnectionFactory)) {
                SingleConnectionFactory scf;
                if (useJms11) {
                    if (connectionFactory instanceof XAConnectionFactory) {
                        scf = new XASingleConnectionFactory(connectionFactory);
                    } else {
                        scf = new SingleConnectionFactory(connectionFactory);
                    }
                    autoWrappedConnectionFactory = true;
                } else {
                    @SuppressWarnings("deprecation")
                    SingleConnectionFactory scf2
                        = new org.springframework.jms.connection.SingleConnectionFactory102(connectionFactory,
                                                                                            pubSubDomain);
                    scf = scf2;
                }
View Full Code Here

Examples of org.springframework.jms.connection.SingleConnectionFactory

        if (wrappedConnectionFactory == null) {
            if (connectionFactory == null) {
                connectionFactory = JMSFactory.getConnectionFactoryFromJndi(this);
            }
            if (wrapInSingleConnectionFactory && !(connectionFactory instanceof SingleConnectionFactory)) {
                SingleConnectionFactory scf;
                if (useJms11) {
                    if (connectionFactory instanceof XAConnectionFactory) {
                        scf = new XASingleConnectionFactory(connectionFactory);
                    } else {
                        scf = new SingleConnectionFactory(connectionFactory);
                    }
                } else {
                    scf = new SingleConnectionFactory102(connectionFactory, pubSubDomain);
                }
                if (getDurableSubscriptionClientId() != null) {
                    scf.setClientId(getDurableSubscriptionClientId());
                }
                scf.setReconnectOnException(isReconnectOnException());
                wrappedConnectionFactory = scf;
            } else {
                wrappedConnectionFactory = connectionFactory;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.