Examples of ActiveMQConnectionFactory


Examples of org.apache.activemq.ActiveMQConnectionFactory

      amqBroker.addConnector("stomp://" + hostName + ":" + portNumber);
      amqBroker.start();
    } catch(Exception e) {
      System.err.println("Cannot broker messages: " + e);
    }
    ActiveMQConnectionFactory connectionFactory=new ActiveMQConnectionFactory("vm://localhost");

    Connection connection=connectionFactory.createConnection();
    connection.start();
    Session session=connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

    Destination destination=session.createQueue("noit.firehose");
    consumer = session.createConsumer(destination);
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

      amqBroker.addConnector("stomp://" + hostName + ":" + portNumber);
      amqBroker.start();
    } catch(Exception e) {
      System.err.println("Cannot broker messages: " + e);
    }
    ActiveMQConnectionFactory connectionFactory=new ActiveMQConnectionFactory("vm://localhost");

    Connection connection=connectionFactory.createConnection();
    connection.start();
    session=connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

  }
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

    public void run() {
        Connection connection = null;
        try {
            // Create the connection.
            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
            connection = connectionFactory.createConnection();
            connection.start();

            // Create the session
            Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
            if (topic) {
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

    public void run() {
        try {
            running = true;

            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
            Connection connection = connectionFactory.createConnection();
            if (durable && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) {
                connection.setClientID(clientId);
            }
            connection.setExceptionListener(this);
            connection.start();
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

        camelContext = new DefaultCamelContext();
        broker = new JmsBroker("vm://localhost");
        broker.start();
        // Set up the ActiveMQ JMS Components
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost");

        // Note we can explicitly name the component
        camelContext.addComponent("jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));

        camelContext.addRoutes(new LoanBroker());
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

public class ActiveMqTestJms implements TestJms {
    public void init(Properties props) {
    }

    public ConnectionFactory getConnectionFactory() {
        return new ActiveMQConnectionFactory("tcp://localhost:61616");
    }
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

  public void xtestOneWayInJmsOutPojo() throws Exception {
   
    final CountDownLatch receivedCountDown = new CountDownLatch(1);
   
        // Configure the components
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
        container.addComponent("activemq", jmsComponentClientAcknowledge(connectionFactory));
        PojoComponent component = new PojoComponent();
        component.addService("listener", new MessageListener(){
      public void onMessage(Message msg) {
        System.out.println("Received: "+msg);
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

    }

    protected CamelContext createCamelContext() throws Exception {
        CamelContext camelContext = super.createCamelContext();

        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
        camelContext.addComponent(componentName, jmsComponentClientAcknowledge(connectionFactory));

        return camelContext;
    }
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

    }

    protected CamelContext createCamelContext() throws Exception {
        CamelContext camelContext = super.createCamelContext();

        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
        camelContext.addComponent("jms", jmsComponentClientAcknowledge(connectionFactory));

        return camelContext;
    }
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

            ra.start(bootstrapContext);
        } catch (ResourceAdapterInternalException e) {
            throw new OpenEJBException(e);
        }
        // Create a ConnectionFactory
        connectionFactory = new ActiveMQConnectionFactory(brokerAddress);
    }
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.