Examples of SessionTransactionSynchronization


Examples of org.apache.camel.component.sjms.tx.SessionTransactionSynchronization

     * waits for the response. Use an atomic long to manage the countdown
     */
    @Override
    public void sendMessage(final Exchange exchange, final AsyncCallback callback, final MessageProducerResources producer) throws Exception {
        if (isEndpointTransacted()) {
            exchange.getUnitOfWork().addSynchronization(new SessionTransactionSynchronization(producer.getSession(), getCommitStrategy()));
        }

        Message request = SjmsExchangeMessageHelper.createMessage(exchange, producer.getSession(), getSjmsEndpoint().getJmsKeyFormatStrategy(), getSjmsEndpoint().getCamelContext().getTypeConverter());

        // TODO just set the correlation id don't get it from the
View Full Code Here

Examples of org.apache.camel.component.sjms.tx.SessionTransactionSynchronization

                    messages.add(message);
                }
            }

            if (isEndpointTransacted()) {
                exchange.getUnitOfWork().addSynchronization(new SessionTransactionSynchronization(producer.getSession(), producer.getCommitStrategy()));
            }
            for (final Message message : messages) {
                producer.getMessageProducer().send(message);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.camel.component.sjms.tx.SessionTransactionSynchronization

        Synchronization synchronization;
        if (commitStrategy instanceof BatchTransactionCommitStrategy) {
            TimedTaskManager timedTaskManager = getEndpoint().getComponent().getTimedTaskManager();
            synchronization = new SessionBatchTransactionSynchronization(timedTaskManager, session, commitStrategy, getTransactionBatchTimeout());
        } else {
            synchronization = new SessionTransactionSynchronization(session, commitStrategy);
        }

        AbstractMessageHandler messageHandler;
        if (getEndpoint().getExchangePattern().equals(ExchangePattern.InOnly)) {
            if (isTransacted()) {
View Full Code Here

Examples of org.apache.camel.component.sjms.tx.SessionTransactionSynchronization

                exchange.setException(new Exception("Producer Resource Pool is exhausted"));
            }
            if (producer != null) {

                if (isEndpointTransacted()) {
                    exchange.getUnitOfWork().addSynchronization(new SessionTransactionSynchronization(producer.getSession(), getCommitStrategy()));
                }

                Message request = SjmsExchangeMessageHelper.createMessage(exchange, producer.getSession(), getSjmsEndpoint().getJmsKeyFormatStrategy());

                // TODO just set the correlation id don't get it from the
View Full Code Here

Examples of org.apache.camel.component.sjms.tx.SessionTransactionSynchronization

                        messages.add(message);
                    }
                }

                if (isEndpointTransacted()) {
                    exchange.getUnitOfWork().addSynchronization(new SessionTransactionSynchronization(producer.getSession(), producer.getCommitStrategy()));
                }
                for (final Message message : messages) {
                    producer.getMessageProducer().send(message);
                }
            } else {
View Full Code Here

Examples of org.apache.camel.component.sjms.tx.SessionTransactionSynchronization

                exchange.setException(new Exception("Producer Resource Pool is exhausted"));
            }
            if (producer != null) {

                if (isEndpointTransacted()) {
                    exchange.getUnitOfWork().addSynchronization(new SessionTransactionSynchronization(producer.getSession(), getCommitStrategy()));
                }

                Message request = SjmsExchangeMessageHelper.createMessage(exchange, producer.getSession(), getSjmsEndpoint().getJmsKeyFormatStrategy());

                // TODO just set the correlation id don't get it from the
View Full Code Here

Examples of org.apache.camel.component.sjms.tx.SessionTransactionSynchronization

                        messages.add(message);
                    }
                }

                if (isEndpointTransacted()) {
                    exchange.getUnitOfWork().addSynchronization(new SessionTransactionSynchronization(producer.getSession(), producer.getCommitStrategy()));
                }
                for (final Message message : messages) {
                    producer.getMessageProducer().send(message);
                }
            } else {
View Full Code Here

Examples of org.apache.camel.component.sjms.tx.SessionTransactionSynchronization

        Synchronization synchronization;
        if (commitStrategy instanceof BatchTransactionCommitStrategy) {
            TimedTaskManager timedTaskManager = getEndpoint().getComponent().getTimedTaskManager();
            synchronization = new SessionBatchTransactionSynchronization(timedTaskManager, session, commitStrategy, getTransactionBatchTimeout());
        } else {
            synchronization = new SessionTransactionSynchronization(session, commitStrategy);
        }

        AbstractMessageHandler messageHandler;
        if (getEndpoint().getExchangePattern().equals(ExchangePattern.InOnly)) {
            if (isTransacted()) {
View Full Code Here

Examples of org.apache.camel.component.sjms.tx.SessionTransactionSynchronization

                    messages.add(message);
                }
            }

            if (isEndpointTransacted()) {
                exchange.getUnitOfWork().addSynchronization(new SessionTransactionSynchronization(producer.getSession(), producer.getCommitStrategy()));
            }
            for (final Message message : messages) {
                producer.getMessageProducer().send(message);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.camel.component.sjms.tx.SessionTransactionSynchronization

        Synchronization synchronization;
        if (commitStrategy instanceof BatchTransactionCommitStrategy) {
            TimedTaskManager timedTaskManager = getEndpoint().getComponent().getTimedTaskManager();
            synchronization = new SessionBatchTransactionSynchronization(timedTaskManager, session, commitStrategy, getTransactionBatchTimeout());
        } else {
            synchronization = new SessionTransactionSynchronization(session, commitStrategy);
        }

        AbstractMessageHandler messageHandler;
        if (getEndpoint().getExchangePattern().equals(ExchangePattern.InOnly)) {
            if (isTransacted()) {
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.