Package javax.jbi.messaging

Examples of javax.jbi.messaging.DeliveryChannel.accept()


        // Create another thread
        Thread t = new Thread() {
            public void run() {
                try {
                    InOut me = (InOut) channel.accept(5000);
                    NormalizedMessage nm = me.createMessage();
                    nm.setContent(new StringSource("<response/>"));
                    me.setOutMessage(nm);
                    channel.sendSync(me);
                    success.set(true);
View Full Code Here


    public void run() {
        try {
            while (running) {
                DeliveryChannel deliveryChannel = context.getDeliveryChannel();
                System.out.println("about to do an accept on deliveryChannel: " + deliveryChannel);
                MessageExchange messageExchange = deliveryChannel.accept();
                System.out.println("received me: " + messageExchange);
                onMessageExchange(messageExchange);
            }
        }
        catch (MessagingException e) {
View Full Code Here

     */
    public void run() {
        try {
            DeliveryChannel deliveryChannel = getDeliveryChannel();
            while (!stop.get()) {
                MessageExchange exchange = deliveryChannel.accept();
                if (exchange != null) {
                    try {
                        onMessageExchange(exchange);
                    } catch (MessagingException e) {
                        log.error("MessageExchange processing failed", e);
View Full Code Here

        this.meListener = new Thread(new Runnable() {
            public void run() {
                try {
                    DeliveryChannel channel = AbstractComponent.this.context.getDeliveryChannel();
                    while (true) {
                        final MessageExchange me = channel.accept();
                        if (me.isTransacted()) {
                            TransactionManager mgr = (TransactionManager) AbstractComponent.this.context.getTransactionManager();
                            Transaction tx = (Transaction) me.getProperty(MessageExchange.JTA_TRANSACTION_PROPERTY_NAME);
                            if (tx == mgr.getTransaction()) {
                                mgr.suspend();
View Full Code Here

    public void run() {
        while (running) {
            try {
                DeliveryChannel deliveryChannel = context.getDeliveryChannel();
                System.out.println("about to do an accept on deliveryChannel: " + deliveryChannel);
                MessageExchange messageExchange = deliveryChannel.accept();
                System.out.println("received me: " + messageExchange);
                onMessageExchange(messageExchange);
            }
            catch (MessagingException e) {
                log.error("Failed to process inbound messages: " + e, e);
View Full Code Here

     */
    public void run() {
        try {
            DeliveryChannel deliveryChannel = getDeliveryChannel();
            while (!stop.get()) {
                MessageExchange exchange = deliveryChannel.accept();
                if (exchange != null) {
                    try {
                        onMessageExchange(exchange);
                    } catch (MessagingException e) {
                        log.error("MessageExchange processing failed", e);
View Full Code Here

        }
        public void run() {
            while (running) {
                try {
                    DeliveryChannel deliveryChannel = getContext().getDeliveryChannel();
                    MessageExchange messageExchange = deliveryChannel.accept();
                    process(messageExchange);
                }
                catch (Exception e) {
                    e.printStackTrace();
                }
View Full Code Here

     */
    public void run() {
        try {
            DeliveryChannel deliveryChannel = getDeliveryChannel();
            while (!stop.get()) {
                MessageExchange exchange = deliveryChannel.accept();
                if (exchange != null) {
                    try {
                        onMessageExchange(exchange);
                    } catch (MessagingException e) {
                        LOGGER.error("MessageExchange processing failed", e);
View Full Code Here

    public void run() {
        while (running) {
            try {
                DeliveryChannel deliveryChannel = context.getDeliveryChannel();
                LOGGER.info("about to do an accept on deliveryChannel: {}", deliveryChannel);
                MessageExchange messageExchange = deliveryChannel.accept();
                LOGGER.info("received me: {}", messageExchange);
                onMessageExchange(messageExchange);
            } catch (MessagingException e) {
                LOGGER.error("Failed to process inbound messages: {}", e.getMessage(), e);
            }
View Full Code Here

        }
        public void run() {
            while (running) {
                try {
                    DeliveryChannel deliveryChannel = getContext().getDeliveryChannel();
                    MessageExchange messageExchange = deliveryChannel.accept();
                    process(messageExchange);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
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.