Examples of DeadLetterPolicy


Examples of org.activemq.service.DeadLetterPolicy

                    .invoke(ObjectName.getInstance(CONNECTION_FACTORY_NAME),
                            "$getResource");
            connection = connectionFactory.createConnection();
            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

            DeadLetterPolicy dlp = new DeadLetterPolicy();

            //dlqName =
            // dlp.getDeadLetterNameFromDestination((ActiveMQDestination)
            // destination);
            // This is a hack to get around the fact that the code commented
            // above throws a ClassCastException due to ClassLoader weirdness.
            Field f = dlp.getClass().getDeclaredField(
                    "deadLetterPerDestinationName");
            f.setAccessible(true);
            boolean deadLetterPerDestinationName = f.getBoolean(dlp);
            f = dlp.getClass().getDeclaredField("deadLetterPrefix");
            f.setAccessible(true);
            String deadLetterPrefix = "" + f.get(dlp);
            if (deadLetterPerDestinationName) {
                dlqName = deadLetterPrefix
                        + destination.getClass().getMethod("getPhysicalName",
View Full Code Here

Examples of org.activemq.service.DeadLetterPolicy

                    .invoke(JCA_MANAGED_CONNECTION_FACTORY_NAME,
                            "$getResource");
            connection = connectionFactory.createConnection();
            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

            DeadLetterPolicy dlp = new DeadLetterPolicy();

            //dlqName =
            // dlp.getDeadLetterNameFromDestination((ActiveMQDestination)
            // destination);
            // This is a hack to get around the fact that the code commented
            // above throws a ClassCastException due to ClassLoader weirdness.
            Field f = dlp.getClass().getDeclaredField(
                    "deadLetterPerDestinationName");
            f.setAccessible(true);
            boolean deadLetterPerDestinationName = f.getBoolean(dlp);
            f = dlp.getClass().getDeclaredField("deadLetterPrefix");
            f.setAccessible(true);
            String deadLetterPrefix = "" + f.get(dlp);
            if (deadLetterPerDestinationName) {
                dlqName = deadLetterPrefix
                        + destination.getClass().getMethod("getPhysicalName",
View Full Code Here

Examples of org.activemq.service.DeadLetterPolicy

        ConsumerInfo consumerInfo = createConsumerInfo();

        // lets register the subscription with the manager
        messageContainerManager.addMessageConsumer(client, consumerInfo);

        return new DurableTopicSubscription(new DispatcherImpl(), client, consumerInfo, filter, new RedeliveryPolicy(),new DeadLetterPolicy());
    }
View Full Code Here

Examples of org.activemq.service.DeadLetterPolicy

        super.tearDown();
    }

    protected MessageContainerManager createMessageContainerManager() {
        if (destination.isTopic()) {
            return new DurableTopicMessageContainerManager(persistenceAapter, new DurableTopicSubscriptionContainerImpl(new RedeliveryPolicy(),new DeadLetterPolicy()), new FilterFactoryImpl(), new DispatcherImpl());
        }
        else {
            return new DurableQueueMessageContainerManager(persistenceAapter, new DurableTopicSubscriptionContainerImpl(new RedeliveryPolicy(),new DeadLetterPolicy()), new FilterFactoryImpl(), new DispatcherImpl());
        }
    }
View Full Code Here

Examples of org.activemq.service.DeadLetterPolicy

    public void start() throws JMSException {
        if (redeliveryPolicy == null) {
            redeliveryPolicy = new RedeliveryPolicy();
        }
        if (deadLetterPolicy == null){
            deadLetterPolicy = new DeadLetterPolicy(this);
        }
        if (persistenceAdapter == null) {
            persistenceAdapter = createPersistenceAdapter();
        }
        persistenceAdapter.start();
View Full Code Here

Examples of org.activemq.service.DeadLetterPolicy

    public void start() throws JMSException {
        if (redeliveryPolicy == null) {
            redeliveryPolicy = new RedeliveryPolicy();
        }
        if (deadLetterPolicy == null){
            deadLetterPolicy = new DeadLetterPolicy(this);
        }
        if (persistenceAdapter == null) {
            persistenceAdapter = createPersistenceAdapter();
        }
        persistenceAdapter.start();
View Full Code Here

Examples of org.activemq.service.DeadLetterPolicy

*/
public class TransientTopicMessageContainerManager extends DurableTopicMessageContainerManager {
    private static final Log log = LogFactory.getLog(TransientTopicMessageContainerManager.class);

    public TransientTopicMessageContainerManager(PersistenceAdapter persistenceAdapter) {
        this(persistenceAdapter, new SubscriptionContainerImpl(new RedeliveryPolicy(), new DeadLetterPolicy()), new FilterFactoryImpl(), new DispatcherImpl());
    }
View Full Code Here

Examples of org.activemq.service.DeadLetterPolicy

        ConsumerInfo consumerInfo = createConsumerInfo();

        // lets register the subscription with the manager
        messageContainerManager.addMessageConsumer(client, consumerInfo);

        return new DurableTopicSubscription(new DispatcherImpl(), client, consumerInfo, filter, new RedeliveryPolicy(),new DeadLetterPolicy());
    }
View Full Code Here

Examples of org.activemq.service.DeadLetterPolicy

        super.tearDown();
    }

    protected MessageContainerManager createMessageContainerManager() {
        if (destination.isTopic()) {
            return new DurableTopicMessageContainerManager(persistenceAapter, new DurableTopicSubscriptionContainerImpl(new RedeliveryPolicy(),new DeadLetterPolicy()), new FilterFactoryImpl(), new DispatcherImpl());
        }
        else {
            return new DurableQueueMessageContainerManager(persistenceAapter, new DurableTopicSubscriptionContainerImpl(new RedeliveryPolicy(),new DeadLetterPolicy()), new FilterFactoryImpl(), new DispatcherImpl());
        }
    }
View Full Code Here

Examples of org.activemq.service.DeadLetterPolicy

    public void start() throws JMSException {
        if (redeliveryPolicy == null) {
            redeliveryPolicy = new RedeliveryPolicy();
        }
        if (deadLetterPolicy == null){
            deadLetterPolicy = new DeadLetterPolicy(this);
        }
        if (persistenceAdapter == null) {
            persistenceAdapter = createPersistenceAdapter();
        }
        persistenceAdapter.start();
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.