Examples of beforeDelivery()


Examples of javax.resource.spi.endpoint.MessageEndpoint.beforeDelivery()

            XAResource xar = xa.getXAResource();
            s = xa.getSession();
            mc = s.createConsumer(getDestination());           
            ep = factory.createEndpoint(xar);
            ENDPOINT_LOCAL.set(ep);
            ep.beforeDelivery(method);  
            messageReceived = doReceiveAndExecute(s, mc, null);
            ep.afterDelivery();
        } catch (Exception ex) {
            throw new JMSException(ex.getMessage());
        } finally {
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint.beforeDelivery()

            if (emailConsumer == null) throw new Exception("No such account");

            MessageEndpoint endpoint = (MessageEndpoint) emailConsumer;

            endpoint.beforeDelivery(EmailConsumer.class.getMethod("receiveEmail", Properties.class, String.class));
            emailConsumer.receiveEmail(headers, body);
            endpoint.afterDelivery();
        }
    }
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint.beforeDelivery()

                if (null == method) {
                    method = job.getClass().getMethod("execute", JobExecutionContext.class);
                }

                endpoint = (MessageEndpoint) job;
                endpoint.beforeDelivery(method);

                job.execute(execution);

            } catch (NoSuchMethodException e) {
                throw new IllegalStateException(e);
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint.beforeDelivery()

            try {
             
                MessageEndpoint endpoint = endpointFactory.createEndpoint(xaResource);
                MessageListener listener = (MessageListener) endpoint;

                endpoint.beforeDelivery(ON_MESSAGE_METHOD);
                try {
                    listener.onMessage(message);
                } finally {
                    endpoint.afterDelivery();
                }
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint.beforeDelivery()

                if (null == method) {
                    method = Job.class.getMethod("execute", JobExecutionContext.class);
                }

                endpoint.beforeDelivery(method);

                job.execute(execution);

            } catch (NoSuchMethodException e) {
                throw new IllegalStateException(e);
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint.beforeDelivery()

    protected void preDeliveryHook(MessageListener listener, ActiveMQMessage message) {
        if (listener instanceof MessageEndpoint) {
            MessageEndpoint endpoint = (MessageEndpoint) listener;
            try {
                endpoint.beforeDelivery(ActiveMQBaseEndpointWorker.ON_MESSAGE_METHOD);
            } catch (NoSuchMethodException e) {
                log.error(e.toString(), e);
            } catch (ResourceException e) {
                log.warn(e.toString(), e);
            }
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint.beforeDelivery()

            if (emailConsumer == null) throw new Exception("No such account");

            MessageEndpoint endpoint = (MessageEndpoint) emailConsumer;

            endpoint.beforeDelivery(EmailConsumer.class.getMethod("receiveEmail", Properties.class, String.class));
            emailConsumer.receiveEmail(headers, body);
            endpoint.afterDelivery();
        }
    }
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.