이 콘텐츠는 선택한 언어로 제공되지 않습니다.

16.2. Basic Configuration


Procedure

To configure a provider endpoint do the following:
  1. Decide what type of provider endpoint to use.
  2. Specify the name of the service for which this endpoint is acting as a proxy.
    This is specified using the service attribute.
    Tip
    If you are using a SOAP provider and your WSDL file only has one service defined, you do not need to specify the service name.
  3. Specify the name of the endpoint for which this endpoint is acting as a proxy.
    This is specified using the endpoint attribute.
    Tip
    If you are using a SOAP provider and your WSDL file only has one endpoint defined, you do not need to specify the endpoint name.
  4. Specify the connection factory the endpoint will use.
    The endpoint's connection factory is configured using the endpoint's connectionFactory attribute. The connectionFactory attribute's value is a reference to the bean that configures the connection factory. For example, if the connection factory configuration bean is named widgetConnectionFactory, the value of the connectionFactory attribute would be #widgetConnectionFactory.
    For information on configuring a connection factory see Chapter 14, Configuring the Connection Factory.
  5. Specify the destination onto which the endpoint will place messages.
  6. If you are using a JMS SOAP provider, specify the location of the WSDL defining the message exchange using the wsdl attribute.
  7. If your JMS destination is a topic, set the pubSubDomaim attribute to true.
  8. If your endpoint is interacting with a broker that only supports JMS 1.0.2, set the jms102 attribute to true.

Configuring a destination

A provider endpoint chooses the destination to use for sending messages 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 19.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 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 destination attribute as shown in Example 16.1, “Configuring a Provider's Destination”. You can also add the bean directly to the endpoint by wrapping it in a jms:destination child element.

    Example 16.1. Configuring a Provider's Destination

    <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
           ... >
      ...
      <jms:provider service="my:widgetService"
                     endpoint="jbiWidget"
                     destination="#widgetQueue"
                     connectionFactory="#connectionFactory" />
      ...
      <jee:jndi-lookup id="widgetQueue" jndi-name="my.widget.queue">
        <jee:environment>
          java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
          java.naming.provider.url=t3://localhost:7001
        </jee:environment>
      </jee:jndi-lookup>
      ...
    </beans>
    Copy to Clipboard Toggle word wrap
  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 destinationName attribute to choose its destination.
    The destinationName 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.createQueue() methods to resolve the JMS destination.
    Note
    You can override the binding component's default behavior by providing a custom DestinationResolver implementation. See Section 19.2, “Using a Custom Destination Resolver”.

Examples

Example 16.2, “Basic Configuration for a Generic Provider Endpoint” shows the basic configuration for a plain JMS provider endpoint.

Example 16.2. Basic Configuration for a Generic Provider Endpoint

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       ... >
  ...
  <jms:provider service="my:widgetService"
                endpoint="jbiWidget"
                destinationName="widgetQueue"
                connectionFactory="#connectionFactory" />
  ...
</beans>
Copy to Clipboard Toggle word wrap
Example 16.3, “Basic Configuration for a SOAP Provider Endpoint” shows the basic configuration for a SOAP JMS provider endpoint.

Example 16.3. Basic Configuration for a SOAP Provider Endpoint

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       ... >
  ...
  <jms:soap-provider wsdl="classpath:widgets.wsdl"
                     destinationName="widgetQueue"
                     connectionFactory="#connectionFactory" />
  ...
</beans>
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat