Examples of beforeDelivery()


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()

           
            Map<Class<?>, Object> mp = new HashMap<Class<?>, Object>();
            mp.put(MessageEndpoint.class, ep);
           
            ENDPOINT_LOCAL.set(mp);
            ep.beforeDelivery(method);               
            messageReceived = doReceiveAndExecute(invoker, 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()

    MessageEndpoint endpoint = null;
    try {
      endpoint = jobHandlerActivation.getMessageEndpointFactory().createEndpoint(null);

      try {
        endpoint.beforeDelivery(method);
      } catch (NoSuchMethodException e) {
        log.log(Level.WARNING, "NoSuchMethodException while invoking beforeDelivery() on MessageEndpoint '"+endpoint+"'", e);
      } catch (ResourceException e) {
        log.log(Level.WARNING, "ResourceException while invoking beforeDelivery() on MessageEndpoint '"+endpoint+"'", 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

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()

            XAResource xar = xa.getXAResource();
            s = xa.getSession();
            mc = s.createConsumer(getDestination());           
            ep = factory.createEndpoint(xar);
            ENDPOINT_LOCAL.set(ep);
            ep.beforeDelivery(method);               
            messageReceived = doReceiveAndExecute(invoker, 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 (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()

            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()

    public void exec(Object impl, String[] args, PrintStream out) throws Throwable {
        try {

            if (impl instanceof MessageEndpoint) {
                MessageEndpoint endpoint = (MessageEndpoint) impl;
                endpoint.beforeDelivery(method);
            }

            final Object result = method.invoke(impl, toParams(args));
            if (result != null) {
                final String text = result.toString().replaceAll("\n*$", "");
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 (final NoSuchMethodException e) {
                throw new IllegalStateException(e);
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.