このコンテンツは選択した言語では利用できません。

4.3. Configuring How Responses are Received


Overview

If your provider endpoint participates in in/out message exchanges, it will wait for a response from receiving endpoint. You can configure the JMS destination on which the endpoint listens for the response. You can also configure the amount of time the endpoint will wait for a response before it times out.

Configuring the response destination

An endpoint chooses the destination to use for receiving responses with the following algorithm:
  1. If you provided a custom DestinationChooser implementation, the endpoint will use that to choose it's endpoint.
    For more information about providing custom DestinationChooser implementations see Section 7.1, “Using a Custom Destination Chooser”.
  2. If you did not provide a custom DestinationChooser implementation, the endpoint will use its default DestinationChooser implementation to choose an endpoint.
    The default destination chooser checks the message exchange received from the NMR for a DESTINATION_KEY property. If the message exchange has that property set, it returns that destination.
  3. If the destination chooser does not return a destination, the endpoint will check to see if you configured the destination explicitly.
    You configure a response destination using a Spring bean. The recommend way to configure the destination is to configure the bean separately and refer the bean using the endpoint's replyDestination attribute as shown in Example 4.1, “Configuring a Provider's Destination”. You can also add the bean directly to the endpoint by wrapping it in a jms:replyDestination child element.
  4. If the destination chooser does not return a destination and you did not explicitly configure a destination, the endpoint will use the value of the replyDestinationName attribute to choose its destination.
    The replyDestinationName attribute takes a string that is used as the name of the destination to use. The binding component's default behavior when you provide a destination name is to resolve the destination using the standard JMS Session.createTopic() and Session.createTopic() methods to resolve the JMS destination.
    Note
    You can override the binding component's default behavior by providing a custom DestinationResolver implementation. See Section 7.2, “Using a Custom Destination Resolver”.

Configuring the timeout interval

By default, a provider endpoint will wait an unlimited amount of time for a response. Since the provider blocks while it is waiting for a response, your application may hang indefinitely if a response does not arrive.
You can configure the endpoint to timeout using the recieveTimeout attribute. The recieveTimeout attribute specifies the number of milliseconds the provider endpoint will wait for a response before timing out.

Example

Example 4.4, “JMS Provider Endpoint with a Response Destination” shows a JMS provider endpoint that will wait for a response for one minute.

Example 4.4. JMS Provider Endpoint with a Response Destination

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       ... >
  ...
  <jms:soap-provider wsdl="classpath:widgets.wsdl"
                     destinationName="widgetQueue"
                     connectionFactory="#connectionFactory"
                     recieveTimeout="60000"
                     replyDestinationName="widgetResponse" />
  ...
</beans>
Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat