![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
Endpoints represent the services that an adapter provides. Publisher, subscriber, client, or server instances are the endpoints in a custom adapter.TIBCO Designer allows to create endpoints by using the concept of a service. A service encapsulates both an endpoint and the corresponding session. Services include:
Services are abstractions used for GUI configuration purposes. The SDK itself encapsulates endpoints and sessions but not services.Endpoints can be configured through TIBCO Designer or be created programmatically using the appropriate constructor. It is recommended that you use TIBCO Designer for configuration because it enables changing endpoint details (for example, transport information) without recoding.
2. Select the Generic Adapter Configuration resource and drag it into the Design panel.
3. Select the Generic Adapter Configuration instance in the Project panel, click its Adapter Services folder to open it.
4. Select one of the resources (for example, Publication Service) available in the Palette panel and drag it into the Design panel.
5. Specify the relevant information of the service. For example: name, transport type (Rendezvous or JMS), information about the transport in the Transport tab (including wire format and quality of service), schema describing the data the endpoint sends or receives.
1.
2. Assign member variables to the endpoint. These variables specify, among other things, the message format for the endpoint to use.
3.
Because of the advantages of separating configuration from the code, it is preferable to include endpoints in the configuration instead of creating them programmatically.The SDK-based adapters can be written to work with different types of sessions. For example, suppose you have configured an adapter for TIBCO Rendezvous Certified Messaging and have written the corresponding adapter code. If you later decide to switch to TIBCO Enterprise Message Service with explicit confirmation, the code will still work (unless you performed some unusual customizations).In contrast, if you have written code that expects the endpoints to use automatic confirmation, and then change the configuration of the endpoints to use a non-persistent transport, the sending adapter continues to wait for the receiving adapter to confirm the events. As a result, resources will be consumed without being freed.Assume a publisher has been configured to use RVCMQ. In that case, the following code fragment would send messages in aeRvmsg wire format.Suppose you want to change the message to be sent in using TIBCO Enterprise Message Service and, because of that, aeXml wire format. You can change the endpoint configuration using TIBCO Designer and the code will work, but there will be serious performance degradation.The instance is first converted to MTree using aeRvmsg wire format. When the MTree is sent out by the JMS endpoint, the MTree is deserialized back to Minstance and then converted to the an MTree using aeXml wire format. The code should therefore be changed as follows:The MInstance is now sent directly, and the SDK takes care of the serialization.
Change all the programs to send out MInstance objects instead of serializing the MInstance to MTree.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |