public Destination getReplyDestination(Session session, String replyToName) throws JMSException { if (replyToName != null) { return destinationResolver.resolveDestinationName(session, replyToName, replyPubSubDomain); } return getReplyDestination(session); }
private Destination getReplyToDestination(Session session, Message inMessage2) throws JMSException { javax.jms.Message message = (javax.jms.Message)inMessage2.get(JMSConstants.JMS_REQUEST_MESSAGE); // If WS-Addressing had set the replyTo header. final String replyToName = (String)inMessage2.get(JMSConstants.JMS_REBASED_REPLY_TO); if (replyToName != null) { return jmsConfig.getReplyDestination(session, replyToName); } else if (message.getJMSReplyTo() != null) { return message.getJMSReplyTo(); } else { return jmsConfig.getReplyDestination(session); } }
public Destination getReplyToDestination(Session session, String userDestination) throws JMSException { if (userDestination != null) { return destinationResolver.resolveDestinationName(session, userDestination, replyPubSubDomain); } if (replyToDestination == null) { return getReplyDestination(session); } Destination result = replyToDestinationDest; if (result == null) { synchronized (this) { result = replyToDestinationDest; if (result == null) { result = destinationResolver.resolveDestinationName(session, replyToDestination, replyPubSubDomain); replyToDestinationDest = result; } } } return result; }
private MessageConsumer createConsumer(final Connection connection, final Session session) throws JMSException { final MessageConsumer consumer; if (jmsConfig != null && jmsConfig.isOneSessionPerConnection()) { Destination destination; if (!isReply()) { destination = jmsConfig.getTargetDestination(session); } else { destination = jmsConfig.getReplyDestination(session); } consumer = createConsumer(destination, session); connection.start(); } else { consumer = createConsumer(session); } return consumer; }
jmsConfig.getReplyToDestination(session, replyTo), correlationId, closer, session); Destination replyDestination = jmsConfig.getReplyDestination(session, replyTo); boolean useSyncReceive = ((correlationId == null || userCID != null) && !jmsConfig.isPubSubDomain()) || !replyDestination.equals(staticReplyDestination);
private String sendMessage(final Object request, final Message outMessage, Destination replyToDestination, String correlationId, ResourceCloser closer, Session session) throws JMSException { JMSMessageHeadersType headers = getOrCreateJmsHeaders(outMessage); javax.jms.Message message = JMSMessageUtils.asJMSMessage(jmsConfig, outMessage, request, jmsConfig.getMessageType(), session, correlationId, JMSConstants.JMS_CLIENT_REQUEST_HEADERS); if (replyToDestination == null && headers.isSetJMSReplyTo()) { String replyTo = headers.getJMSReplyTo(); replyToDestination = jmsConfig.getReplyDestination(session, replyTo); } if (replyToDestination != null) { message.setJMSReplyTo(replyToDestination); } JMSSender sender = JMSFactory.createJmsSender(jmsConfig, headers); Destination targetDest = jmsConfig.getTargetDestination(session); sender.sendMessage(session, targetDest, message); String jmsMessageID = message.getJMSMessageID(); LOG.log(Level.FINE, "client sending request message " + jmsMessageID + " to " + targetDest); headers.setJMSMessageID(jmsMessageID); return jmsMessageID; }
synchronized (this) { if (staticReplyDestination == null) { staticReplyDestination = jmsConfig.getReplyDestination(session);