Examples of ActiveMQActivationSpec


Examples of org.apache.activemq.ra.ActiveMQActivationSpec

    public void start() throws JBIException {
        if (started.compareAndSet(false, true)) {
            super.start();
            try {
                // Inbound broadcast
                ActiveMQActivationSpec ac = new ActiveMQActivationSpec();
                ac.setDestinationType("javax.jms.Topic");
                ac.setDestination(broadcastDestinationName);
                broadcastConnector = new JCAConnector();
                broadcastConnector.setBootstrapContext(getBootstrapContext());
                broadcastConnector.setActivationSpec(ac);
                broadcastConnector.setResourceAdapter(resourceAdapter);
                broadcastConnector.setEndpointFactory(new SingletonEndpointFactory(new MessageListener() {
View Full Code Here

Examples of org.apache.activemq.ra.ActiveMQActivationSpec

            return;
        }
        try {
            String key = EndpointSupport.getKey(event.getEndpoint());
            if(!connectorMap.containsKey(key)){
                ActiveMQActivationSpec ac = new ActiveMQActivationSpec();
                ac.setDestinationType("javax.jms.Queue");
                ac.setDestination(INBOUND_PREFIX + key);
                JCAConnector connector = new JCAConnector();
                connector.setBootstrapContext(getBootstrapContext());
                connector.setActivationSpec(ac);
                connector.setResourceAdapter(resourceAdapter);
                connector.setEndpointFactory(new SingletonEndpointFactory(this, getTransactionManager()));
View Full Code Here

Examples of org.apache.activemq.ra.ActiveMQActivationSpec

            return;
        }
        try {
            String key = event.getComponent().getName();
            if(!connectorMap.containsKey(key)){
                ActiveMQActivationSpec ac = new ActiveMQActivationSpec();
                ac.setDestinationType("javax.jms.Queue");
                ac.setDestination(INBOUND_PREFIX + key);
                JCAConnector connector = new JCAConnector();
                connector.setBootstrapContext(getBootstrapContext());
                connector.setActivationSpec(ac);
                connector.setResourceAdapter(resourceAdapter);
                connector.setEndpointFactory(new SingletonEndpointFactory(this, getTransactionManager()));
View Full Code Here

Examples of org.apache.activemq.ra.ActiveMQActivationSpec

            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

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

Examples of org.apache.activemq.ra.ActiveMQActivationSpec

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

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

Examples of org.apache.activemq.ra.ActiveMQActivationSpec

        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

Examples of org.apache.activemq.ra.ActiveMQActivationSpec

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

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

Examples of org.apache.activemq.ra.ActiveMQActivationSpec

        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

Examples of org.apache.activemq.ra.ActiveMQActivationSpec

        }
    }

    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
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.