Package org.apache.activemq.ra

Examples of org.apache.activemq.ra.ActiveMQResourceAdapter


    /**
     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception {
       
      ActiveMQResourceAdapter adapter = new ActiveMQResourceAdapter();
      adapter.setServerUrl(DEFAULT_HOST);
      adapter.setUserName(ActiveMQConnectionFactory.DEFAULT_USER);
      adapter.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
      adapter.start(new BootstrapContext(){
      public WorkManager getWorkManager() {
        return null;
      }
      public XATerminator getXATerminator() {
        return null;
View Full Code Here


    public void setBroadcastDestinationName(String broadcastDestinationName) {
        this.broadcastDestinationName = broadcastDestinationName;
    }

    protected ResourceAdapter createResourceAdapter() throws ResourceAdapterInternalException {
      ActiveMQResourceAdapter ra = new ActiveMQResourceAdapter();
      ra.setServerUrl(jmsURL);
      ra.start(getBootstrapContext());
      return ra;
    }
View Full Code Here

            ActiveMQDestination dest = new ActiveMQQueue(INBOUND_PREFIX + broker.getContainer().getName());
            containerConnector = new Connector(dest, this, true);
            containerConnector.start();

            // Outbound connector
            ActiveMQResourceAdapter outboundRa = new ActiveMQResourceAdapter();
            outboundRa.setConnectionFactory(connectionFactory);
            //
            // We need to explicitly set the server url unless we use the
            // default jms url, so set it.
            //
            if (outboundRa.getInfo().getServerUrl() == null) {
                log.info("ActiveMQResourceAdapter server url was null.  Setting it to: " + jmsURL);
                outboundRa.getInfo().setServerUrl(jmsURL);
            }
            ActiveMQManagedConnectionFactory mcf = new ActiveMQManagedConnectionFactory();
            mcf.setResourceAdapter(outboundRa);
            managedConnectionFactory = (ConnectionFactory) mcf.createConnectionFactory(getConnectionManager());
View Full Code Here

        private ActiveMQActivationSpec spec;

        private Executor executor;

        public Connector(ActiveMQDestination destination, MessageListener listener, boolean transacted) {
            ra = new ActiveMQResourceAdapter();
            ra.setConnectionFactory(connectionFactory);
            SingletonEndpointFactory ef = new SingletonEndpointFactory(listener, transacted ? getTransactionManager() : null);
            ef.setName(INBOUND_PREFIX + broker.getContainer().getName());
            endpointFactory = ef;
            spec = new ActiveMQActivationSpec();
View Full Code Here

        super(name);
    }

    protected void setUp() throws Exception {
        super.setUp();
        raOne = new ActiveMQResourceAdapter();       
        raTwo = new ActiveMQResourceAdapter();
    }
View Full Code Here

            ActiveMQDestination dest = new ActiveMQQueue(INBOUND_PREFIX + broker.getContainer().getName());
            containerConnector = new Connector(dest, this, true);
            containerConnector.start();

            // Outbound connector
            ActiveMQResourceAdapter outboundRa = new ActiveMQResourceAdapter();
            outboundRa.setConnectionFactory(connectionFactory);
            //
            // We need to explicitly set the server url unless we use the
            // default jms url, so set it.
            //
            if (outboundRa.getInfo().getServerUrl() == null) {
                log.info("ActiveMQResourceAdapter server url was null.  Setting it to: " + jmsURL);
                outboundRa.getInfo().setServerUrl(jmsURL);
            }
            ActiveMQManagedConnectionFactory mcf = new ActiveMQManagedConnectionFactory();
            mcf.setResourceAdapter(outboundRa);
            managedConnectionFactory = (ConnectionFactory) mcf.createConnectionFactory(getConnectionManager());
View Full Code Here

        private ActiveMQActivationSpec spec;

        private Executor executor;

        public Connector(ActiveMQDestination destination, MessageListener listener, boolean transacted) {
            ra = new ActiveMQResourceAdapter();
            ra.setConnectionFactory(connectionFactory);
            SingletonEndpointFactory ef = new SingletonEndpointFactory(listener, transacted ? getTransactionManager() : null);
            ef.setName(INBOUND_PREFIX + broker.getContainer().getName());
            endpointFactory = ef;
            spec = new ActiveMQActivationSpec();
View Full Code Here

            ActiveMQDestination dest = new ActiveMQQueue(INBOUND_PREFIX + broker.getContainer().getName());
            containerConnector = new Connector(dest, this, true);
            containerConnector.start();

            // Outbound connector
            ActiveMQResourceAdapter outboundRa = new ActiveMQResourceAdapter();
            outboundRa.setConnectionFactory(connectionFactory);
            //
            // We need to explicitly set the server url unless we use the
            // default jms url, so set it.
            //
            if (outboundRa.getInfo().getServerUrl() == null) {
                log.info("ActiveMQResourceAdapter server url was null.  Setting it to: " + jmsURL);
                outboundRa.getInfo().setServerUrl(jmsURL);
            }
            ActiveMQManagedConnectionFactory mcf = new ActiveMQManagedConnectionFactory();
            mcf.setResourceAdapter(outboundRa);
            managedConnectionFactory = (ConnectionFactory) mcf.createConnectionFactory(getConnectionManager());
View Full Code Here

        private ActiveMQActivationSpec spec;

        private Executor executor;

        public Connector(ActiveMQDestination destination, MessageListener listener, boolean transacted) {
            ra = new ActiveMQResourceAdapter();
            ra.setConnectionFactory(connectionFactory);
            SingletonEndpointFactory ef = new SingletonEndpointFactory(listener, transacted ? getTransactionManager() : null);
            ef.setName(INBOUND_PREFIX + broker.getContainer().getName());
            endpointFactory = ef;
            spec = new ActiveMQActivationSpec();
View Full Code Here

            ActiveMQDestination dest = new ActiveMQQueue(INBOUND_PREFIX + broker.getContainer().getName());
            containerConnector = new Connector(dest, this, true);
            containerConnector.start();
         
          // Outbound connector
            ActiveMQResourceAdapter outboundRa = new ActiveMQResourceAdapter();
            outboundRa.setConnectionFactory(connectionFactory);
            ActiveMQManagedConnectionFactory mcf = new ActiveMQManagedConnectionFactory();
            mcf.setResourceAdapter(outboundRa);
            managedConnectionFactory = (ConnectionFactory) mcf.createConnectionFactory(getConnectionManager());

            // Inbound broadcast
View Full Code Here

TOP

Related Classes of org.apache.activemq.ra.ActiveMQResourceAdapter

Copyright © 2018 www.massapicom. 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.