public void close()

in jbi/cluster/requestor/src/main/java/org/apache/servicemix/jbi/cluster/requestor/ActiveMQJmsRequestorPool.java [278:322]


        public void close() {
            if (!suspended) {
                try {
                    if (transacted == Transacted.Jms) {
                        if (rollbackOnly) {
                            session.rollback();
                        } else {
                            session.commit();
                        }
                        afterClose();
                    } else if (transacted == Transacted.Xa) {
                        try {
                            if (rollbackOnly) {
                                if (logger.isDebugEnabled()) {
                                    logger.debug("Rolling back XA transaction");
                                }
                                transactionManager.rollback();
                            } else {
                                if (logger.isDebugEnabled()) {
                                    logger.debug("Committing XA transaction");
                                }
                                transactionManager.commit();
                            }
                        } catch (Exception e) {
                            throw new TransactionException(e);
                        }
                        afterClose();
                    } else if (transacted == Transacted.ClientAck) {
                        if (message != null) {
                            if (!rollbackOnly) {
                                message.acknowledge();
                            } else {
                                destroyConsumer();
                            }
                        }
                        afterClose();
                    } else {
                        afterClose();
                    }
                } catch (JMSException e) {
                    destroy();
                    throw new RuntimeException(e);
                }
            }
        }