Package org.logicblaze.lingo.jms

Examples of org.logicblaze.lingo.jms.JmsProducer


    private Destination inboundDestination;
    private MessageConsumer receiver;
    private boolean deleteTemporaryDestinationsOnClose;

    public static Requestor newInstance(ConnectionFactory connectionFactory, JmsProducerConfig config, Destination serverDestination) throws JMSException {
        JmsProducer producer = DefaultJmsProducer.newInstance(connectionFactory, config);
        return new SingleThreadedRequestor(producer.getSession(), producer, serverDestination);
    }
View Full Code Here


    public void setMarshaller(JmsMarshaler marshaler) {
        this.marshaler = marshaler;
    }

    public void onMessage(Message jmsMessage) {
        JmsProducer producer = producerPool.borrowProducer();
        try {
            InOut messageExchange = getDeliveryChannel().createExchangeFactory().createInOutExchange();
            NormalizedMessage inMessage = messageExchange.createMessage();
            try {
                marshaler.toNMS(inMessage, jmsMessage);
                messageExchange.setInMessage(inMessage);
                if (getDeliveryChannel().sendSync(messageExchange)) {
                    Session session = producer.getSession();
                    Destination destination = destinationChooser.chooseDestination(messageExchange);
                    Message message = marshaler.createMessage(messageExchange.getOutMessage(), session);
                    producer.getMessageProducer().send(destination, message);
                }
            }
            catch (JMSException e) {
                messageExchange.setError(e);
                messageExchange.setStatus(ExchangeStatus.ERROR);
View Full Code Here

    // Implementation methods
    //-------------------------------------------------------------------------

    protected void process(MessageExchange messageExchange, NormalizedMessage inMessage) throws MessagingException {
        JmsProducer producer = producerPool.borrowProducer();
        try {
            Session session = producer.getSession();
            Message message = marshaler.createMessage(inMessage, session);
            Destination destination = destinationChooser.chooseDestination(messageExchange);
            producer.getMessageProducer().send(destination, message);
            done(messageExchange);
        }
        catch (JMSException e) {
            throw new MessagingException(e);
        }
View Full Code Here

TOP

Related Classes of org.logicblaze.lingo.jms.JmsProducer

Copyright © 2018 www.massapicom. 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.