Package org.apache.activemq.ra

Examples of org.apache.activemq.ra.ActiveMQActivationSpec


    }

    protected void setUp() throws Exception {
        super.setUp();

        activationSpec = new ActiveMQActivationSpec();
        activationSpec.setDestination(DESTINATION);
        activationSpec.setDestinationType(DESTINATION_TYPE);

        destinationProperty = new PropertyDescriptor("destination", ActiveMQActivationSpec.class);
        destinationTypeProperty = new PropertyDescriptor("destinationType", ActiveMQActivationSpec.class);
View Full Code Here


        subscriptionNameProperty = new PropertyDescriptor("subscriptionName", ActiveMQActivationSpec.class);
    }

    public void testDefaultContructionValidation() throws IntrospectionException {
        PropertyDescriptor[] expected = {destinationTypeProperty, destinationProperty};
        assertActivationSpecInvalid(new ActiveMQActivationSpec(), expected);
    }
View Full Code Here

        PropertyDescriptor[] expected = {clientIdProperty, subscriptionNameProperty};
        assertActivationSpecInvalid(expected);
    }   
   
    public void testSetEmptyStringButGetNullValue() {
        ActiveMQActivationSpec activationSpec = new ActiveMQActivationSpec();
       
        activationSpec.setDestinationType(EMPTY_STRING);
        assertNull("Property not null", activationSpec.getDestinationType());
       
        activationSpec.setMessageSelector(EMPTY_STRING);
        assertNull("Property not null", activationSpec.getMessageSelector());
       
        activationSpec.setDestination(EMPTY_STRING);
        assertNull("Property not null", activationSpec.getDestination());
       
        activationSpec.setUserName(EMPTY_STRING);
        assertNull("Property not null", activationSpec.getUserName());
       
        activationSpec.setPassword(EMPTY_STRING);
        assertNull("Property not null", activationSpec.getPassword());
       
        activationSpec.setClientId(EMPTY_STRING);
        assertNull("Property not null", activationSpec.getClientId());
       
        activationSpec.setSubscriptionName(EMPTY_STRING);
        assertNull("Property not null", activationSpec.getSubscriptionName());       
    }
View Full Code Here

    public void testSelfEquality() {
        assertEquality(activationSpec, activationSpec);
    }

    public void testSamePropertiesButNotEqual() {
        assertNonEquality(new ActiveMQActivationSpec(), new ActiveMQActivationSpec());
    }
View Full Code Here

        setupMocks();
        setupEndpointWorker();
    }

    private void setupStubs() {
        stubActivationSpec = new ActiveMQActivationSpec();
        stubActivationSpec.setDestination("some.topic");
        stubActivationSpec.setDestinationType("javax.jms.Topic");
        stubActivationSpec.setSubscriptionDurability(ActiveMQActivationSpec.DURABLE_SUBSCRIPTION);
        stubActivationSpec.setClientId("foo");
        stubActivationSpec.setSubscriptionName("bar");
View Full Code Here

        }
    }

    private void createListener() throws Exception {
        // create the activation spec
        final ActiveMQActivationSpec activationSpec = new ActiveMQActivationSpec();
        activationSpec.setDestinationType("javax.jms.Queue");
        activationSpec.setDestination(REQUEST_QUEUE_NAME);

        // validate the activation spec
        activationSpec.validate();

        // set the resource adapter into the activation spec
        activationSpec.setResourceAdapter(ra);

        // create the message endpoint
        final MessageEndpointFactory endpointFactory = new JmsEndpointFactory();

        // activate the endpoint
View Full Code Here

            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();
            spec.setActiveMQDestination(destination);
        }
View Full Code Here

            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();
            spec.setActiveMQDestination(destination);
        }
View Full Code Here

        }
    }

    private void createListener() throws Exception {
        // create the activation spec
        ActiveMQActivationSpec activationSpec = new ActiveMQActivationSpec();
        activationSpec.setDestinationType("javax.jms.Queue");
        activationSpec.setDestination(REQUEST_QUEUE_NAME);

        // validate the activation spec
        activationSpec.validate();

        // set the resource adapter into the activation spec
        activationSpec.setResourceAdapter(ra);

        // create the message endpoint
        MessageEndpointFactory endpointFactory = new JmsEndpointFactory();

        // activate the endpoint
View Full Code Here

            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();
            spec.setActiveMQDestination(destination);
        }
View Full Code Here

TOP

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

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.