TIBCO Rendezvous Control and Event Generator User Guide

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

TIBCO Rendezvous Control

TIBCO® Rendezvous (a product from TIBCO: www.tibco.com) enables exchange of data across applications running on distributed platforms. TIBCO Rendezvous (TIBCO RV) Control in WebLogic Integration enables seamless connection to, and transfer of data using the Rendezvous daemon. It enables communication via many of the features provided by the TIBCO Rendezvous product, including Certified Message Delivery, Distributed Queue and so on. The sending and receiving applications can be on multiple platforms, as long as the Rendezvous daemon is running on the host machine, or is remotely accessible to the host.

Note: The TIBCO RV control is available in BEA Workshop for WebLogic Platform only for licensed users of WebLogic Integration.

Disclaimer

Use of the TIBCO RV control and event generator with BEA WebLogic Integration in no manner confers or grants the right to use TIBCO Rendezvous including "dynamic libraries". In order to use such TIBCO products, the user of the TIBCO RV control and event generator must obtain a valid license from TIBCO. See http://www.tibco.com for information on how to obtain a licensed copy of Rendezvous.

 


Topics Included in This Section

Overview: Rendezvous Control

Describes the function of the TIBCO RV control within WebLogic Integration.

Creating and Configuring a New Instance of the TIBCO RV Control

Describes how to create and configure a new TIBCO RV control.

Using Subject in a Message

Describes how to set and retrieve the subject descriptor attributes of the message.

Sending and Receiving Messages

Describes the methods used to send and receive messages.

Setting Dynamic Properties

Describes how to modify the TIBCO RV control properties at run time.

 


Overview: Rendezvous Control

The TIBCO RV control enables WebLogic Integration business processes to send and receive messages in the Rendezvous environment. In this environment, the messages are conveyed using Rendezvous daemon (rvd) and Rendezvous agent (rva) transports.

Using the TIBCO RV control, you can send and receive messages in XML, String and TIBCO proprietary Rendezvous Message (TibrvMsg) formats. You can specify TIBCO RV control properties while configuring Rendezvous control or dynamically at run time. Following are some of the other features of TIBCO RV control:

The TIBCO RV control complements the other controls provided in WebLogic Integration, and can be used with other WebLogic Integration business processes. To learn more, see Using Controls in Business Processes in Using Integration Controls, which is located at the following URL:

http://download.oracle.com/docs/cd/E13214_01/wli/docs92/controls/index.html. 

The TIBCO RV event generator listens on a subject, and publishes the received messages to the WebLogic Integration message broker channels. For more information, see TIBCO Rendezvous Event Generator.

 


Creating and Configuring a New Instance of the TIBCO RV Control

You can create and configure a new instance of the TIBCO RV control and add it to your business process. This topic includes the following sections:

To Add a New TIBCO RV Control

Describes how to add a new TIBCO RV control.

To Specify TIBCO RV Control General Settings

Describes how to configure the general settings for the TIBCO RV control such as port id, host name and so on.

To Specify TIBCO RV Control Advanced Settings

Describes how to configure Certified Message settings for the TIBCO RV control.
To Add a New TIBCO RV Control
  1. In the Package Explorer pane, double-click the business process to which you want to add the Tibco control. The business process is displayed in the Design View.
  2. Click Defining a Method for SendMessage Function on the Data Palette and from the drop-down list choose Integration Controls to display the list of controls used for integrating applications.
  3. Note: If the Data Palette view is not visible in BEA Workshop for WebLogic Platform, click WindowArrow symbolShow ViewArrow symbolData Palette from the menu bar.
  4. Select Tibco.
  5. The Insert control: Tibco dialog box appears.

Note: If you are creating the control for the first time, the Locate the Tibco.jar file dialog box will appear. Browse for the tibcorv.jar file located at Tibco series installation and click Open.
  1. In the Insert control: Tibco dialog box enter the following details:
    • In the Field Name, type the variable name used to access the new Tibco control instance from your business process. The name you enter must be a valid Java identifier.
    • In the Insertion point: from the drop-down list select the point where you want the field name to be inserted in the process file.
    • Decide whether you want to make this a control factory and select or clear the Make this a control factory that can create multiple instances at runtime check box. For more information about control factories, see Control Factories: Managing Collections of Controls.
    • Click Next.
    • The Create Control wizard appears.

  2. In the Create Control wizard enter the following details:
    • In the Name field, type the name of your new control extension file.
    • Click Next.
    • The Insert control- Tibco RV dialog-box appears.

  3. In the Insert control- Tibco RV configure the General and Advance settings.
To Specify TIBCO RV Control General Settings

Click the General tab in the Insert control- Tibco RV dialog-box enter the following details (see Figure 1-1).

Figure 1-1 General Settings

General Settings

To Specify TIBCO RV Control Advanced Settings

To specify certified messaging settings for the TIBCO RV click the Advanced tab, to display the advanced options for Certified Messaging. This tab is applicable only if you have selected the Use CM check box in the General tab.

Figure 1-2 Advanced Setting

Advanced Setting

 


The Java Files for a TIBCO RV Control

When you create a new instance of the TIBCO RV control, you create a new Control.java file in your project. The contents of the TIBCO RV control file depends on the selections made in the Insert Control - TIBCO RV dialog.

The two examples in this section depict control files created for a certified message and a non-certified message.

Sample Java File for a TIBCO RV Control Using Certified Messaging
/*
 * An extended TibcoRV control.  
 */
@org.apache.beehive.controls.api.bean.ControlExtension
@com.bea.control.TibcoRV.Transport(service = "Service", network = "", daemon = "beaserv1:1589")
@com.bea.control.TibcoRV.CMTransport(cmname = "", ledgername = "", requestold = false, syncledger = false)
@com.bea.control.TibcoRV.UseCM(true)
public interface TibcoRv extends com.bea.control.TibcoRV {
	public void addListenerForCM(String cmName, String subject);
	static final long serialVersionUID = 1L;
	public TibcoRv create();
}
Sample Java File for a TIBCO RV Control Without Certified Messaging
/*
 * An extended TibcoRV control.  
 */
@org.apache.beehive.controls.api.bean.ControlExtension
@com.bea.control.TibcoRV.Transport(service = "", network = "", daemon = "")
@com.bea.control.TibcoRV.CMTransport(cmname = "", ledgername = "", requestold = false, syncledger = false)
@com.bea.control.TibcoRV.UseCM(false)
public interface TibcoCntrl extends com.bea.control.TibcoRV {
	static final long serialVersionUID = 1L;
	public TibcoCntrl create();
}

 


Using Subject in a Message

This section provides details on construction of a subject name. Each message in the TIBCO Rendezvous environment contains a subject name. An application creates a message and sends it with a subject through the Rendezvous environment. Applications at the other end accept the message by listening on the subject.

Subject Name Syntax

Subject name definitions have basic restrictions, for example, its length, structure and usage of special characters. System designers and developers can set the conventions for subject names keeping in mind the following:

Caution: The restrictions and conventions are implemented by TIBCO Rendezvous and information in this section is indicative only. Refer TIBCO Rendezvous product documentation for more up-to-date information on restrictions, guidelines and examples.
Caution: http://www.tibco.com

 


Sending and Receiving Messages

You can send and receive messages with TIBCO RV control using any one of sendMessage, sendReply or sendRequest functions, and the TIBCO Event Generator, respectively. Messages can be in the form of Rendezvous proprietary data format, string and XML.

Sending Messages

This section provides information on the various functions available for sending messages. To send a message, select a function based on the data type of the message that you want to send. All these functions can send reliable and certified messages, as defined while creating the control. Certified message functions will return sequence numbers while reliable message functions will return zero.

The sendRequest function creates a listener that keeps listening for messages to the reply subject and hence, it does not require explicit creation of listeners. The function returns an instance of the TibrvMsg, which can be used for sending replies.

The sendRequest and sendReply functions are often used together as pairs. An example of such an implementation is:

replymsg = sendRequest(msg, "send.Subject","reply.Subject",5.0);
sendReply( replyMsg, newMsg);

sendMessage ()

Used to send a message via RVDTransport, or a labelled message via CMTransport.

public long sendMessage(TibrvMsg msg , String subject, double timeout) 
msg: the message that needs to be sent subject: subject of the message timeout: time limit for delivery of the message

sendMessageAsString ()

Used to send a string message via RVDTransport, or a labelled string message via CMTransport.

public long sendMessageAsString(String  msg , String fieldName ,String subject, double timeout)
msg: the string message that needs to be sent fieldName: name of the TibRV field used to send the payload subject: subject of the message timeout: time limit for delivery of the message

sendMessageAsXML ()

Used to send an XML message via RVDTransport, or a labelled XML message via CMTransport.

public long sendMessageAsXML(XmlObject  msg ,String fieldName ,String subject, double timeout) 
msg: the XML message that needs to be sent fieldName: name of the TibRV field used to send the payload subject: subject of the message timeout: time limit for delivery of the message

sendRequest ()

Used to send a request message via RVDTransport, or a labelled request message via CMTransport and wait for a reply.

public TibrvMsg sendRequest(TibrvMsg msg, String sendSubject, double timeout) 
msg: the request message that needs to be sent sendSubject: the send subject of the message timeout: amount of time to wait for the reply

sendRequestAsString ()

Used to send a request string message via RVDTransport, or a labelled request string message via CMTransport and wait for a reply.

public TibrvMsg sendRequestAsString(String msg, String fieldName, String sendSubject, double timeout) 
msg: the request string message that needs to be sent fieldName: name of the TibRV field used to send the payload sendSubject: subject of the message timeout: amount of time to wait for the reply

sendRequestAsXML ()

Used to send a request XML message via RVDTransport, or a labelled request message via CMTransport and wait for a reply.

public TibrvMsg sendRequestAsXML(XmlObject msg, String fieldName,String sendSubject, double timeout) 
msg: the request XML message that needs to be sent fieldName: name of the TibRV field used to send the payload sendSubject: subject of the message timeout: amount of time to wait for the reply

sendReply ()

Used to send a reply via RVDTransport, or a labelled reply via CMTransport.

public long sendReply(TibrvMsg replyMsg, TibrvMsg sendMsg, double timeout) 
replyMsg: the reply message sendMsg: the request message timeout: time limit for delivery of the message

sendReplyAsString ()

Used to send a string type reply via RVDTransport, or a labelled string type reply via CMTransport.

public long sendReplyAsString(TibrvMsg replyMsg, String sendMsg, String fieldName, double timeout) 
replyMsg: the reply string message sendMsg: the request string message fieldName: the name of the TibRV field used to send the payload timeout: time limit for delivery of the message

sendReplyAsXML ()

Used to send an XML type reply via RVDTransport, or a labelled XML type reply via CMTransport.

public long sendReplyAsXML(TibrvMsg replyMsg, XmlObject sendMsg, String fieldName, double timeout) 
replyMsg: the reply XML message sendMsg: the request XML message fieldName: the name of the TibRV field used to send the payload timeout: time limit for delivery of the message

setStringEncoding ()

Used to set the character encoding for converting between Java Unicode strings and wire format strings.

void setStringEncoding(java.lang.String encoding) throws java.io.UnsupportedEncodingException; 
encoding: determines encoding

Additional Functions for Certified Messaging

You can include the following two functions when using the CMTransport.

onCMMessageReceipt ()

Used to define a callback method to receive confirmation for message sent. It can only be used with sendMessage or sendReply functions. TIBCO RV control subscribes to two confirmation advisories: _RV.INFO.RVCM.DELIVERY.COMPLETE.> and _RV.ERROR.RVCM.DELIVERY.FAILED.>.

Note: A TIBCO RV control with certified messaging enabled must have an onCMReceipt() method implemented in the process definition. Without this, a runtime exception will be thrown.
public void onCMMessageReceipt(byte[] data); 
data: message data
addListenerForCM ()

Used to pre-register an anticipated listener. When a sending application pre-registers listeners, Rendezvous will store all outbound messages in the sender's ledger. So, when the listener requests certified delivery, it receives the backlogged messages. This function is the same as the addListener method in Rendezvous. Refer TIBCO Rendezvous product documentation for more details.

void addListenerForCM(String cmName, String subject); 
cmName: the certified message name subject: subject of the message

Using the sendMessage Function In a Business Process

The following procedure in an example that describes how to add any TIBCO RV control sendMessage function to a business process.

  1. Open the Client Request node (see Figure 1-3).
  2. Figure 1-3 Defining a Method for SendMessage Function


    Defining a Method for SendMessage Function

  3. In the General Settings tab, enter a name for the new method.
  4. Click Add.
  5. Select String from the Simple list and enter a name for the variable in the Parameter Name field.
  6. Click OK to add your selection to the Client Request node. This represents the message for the sendMessage function.
  7. Repeat steps 3 to 5 above to add two more variables to the list. The new variables represent the field name and the subject name of the sendMessage function.
  8. In the Receive Data tab, create a new variable for each parameter that you created in the General Settings tab of the Client Request node. You must provide variable names for all the parameters. The variable type is pre-defined, based on the parameters to which you are assigning the variable.
  9. Close the Client Request node.
  10. Drag and drop the Perform node from the Nodes Palette and convert the message data from String to TibrvMsg format. See sample code below:
  11. // Generating a Tibrv message from the string data format 
    public void perform() throws Exception
    {
       com.tibco.tibrv.TibrvMsg tibrvMsg = new com.tibco.tibrv.TibrvMsg();
       tibrvMsg.update(TibcoField,TibcoMessage);
    }
  12. Drag and drop the sendMessage function from the Controls tab in the Data Palette into your business process, just below the Client Request node.
  13. Open the Send Data tab of the sendMessage function node. From the Select variables to assign drop-down list, assign the variables that you created in the Receive Data tab of the Client Request node, to the corresponding parameter of the sendMessage function listed in the Control Expects column.
  14. Open the Receive Data tab of the sendMessage function note. From the Select variables to assign drop-down list, create a new variable in which to store the sequence number provided by the sendMessage function.

You can use similar steps to send messages using the sendMessageAsString or the sendMessageAsXML functions. Ignore step 9 above as these functions do not require conversion to TibrvMsg format.

Receiving Messages

To receive messages, use the TIBCO RV Event Generator utility. For details, refer TIBCO Rendezvous Event Generator.

 


Setting Dynamic Properties

You can change the TIBCO RV control properties dynamically at runtime. The TIBCO RV control properties that you can modify are specified in the TibRVDynamicPropertiesDocument type document. This document conforms to the TIBCO RV Control Dynamic Properties schema, which is available in the TibRVSchemas.jar file.

The following is an example on how to change properties dynamically.

  1. Open the Client Request node, as shown in the following figure.
  2. In the General Settings tab, add a variable of type TibRVDynamicPropertiesDocument.
  3. In the Receive Data tab, create a new variable for the parameter that you previously created in the General Settings tab by entering a name for the variable. The variable type is already pre-defined based on the parameter to which you are assigning the variable.
  4. Drag and drop the setXMLProperties function from the Controls tab of the Data Palette, into your business process.
  5. Open the Send Data tab of the setXMLProperties function node. From the Select variables to assign drop-down list, assign the variable that you created in the Receive Data tab of the Client Request node to the corresponding parameter of the setXMLProperties function listed in the Control Expects column. All TIBCO RV Control send message operations (following the setXMLProperties function in the business process) using the properties you specified in the TibRVControlDynamicPropertiesDocument.
  6. While executing your business process at runtime, provide the TibRVControlDynamicPropertiesDocument as input.

Schema of TIBCO RV Control Dynamic Properties

<?xml version="1.0"?>
<xs:schema
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   xmlns="http://www.bea.com/wli/control/TibRVControlDynamicProperties.xsd"
targetNamespace="http://www.bea.com/wli/control/TibRVControlDynamicProperties.xsd"
   elementFormDefault="qualified"
   attributeFormDefault="unqualified">
   <xs:element name="TibRVDynamicProperties">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="service" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="network" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="daemon" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="useCM" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="cmName" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ledgerName" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="requestOld" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="syncLedger" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
</xs:schema>

Sample TIBCO RV Control Dynamic Properties Document

The following is a sample TIBCO RV Control document. You must provide this document at runtime when you execute your business process:

<tib:TibRVDynamicProperties>
   <!--Optional:-->
   <tib:service>7500</tib:service>
   <!--Optional:-->
   <tib:network>beaserv1</tib:network>
   <!--Optional:-->
   <tib:daemon>beaserv1:7500</tib:daemon>
   <!--Optional:-->
   <tib:useCM>true</tib:useCM>
   <!--Optional:-->
   <tib:cmName>cmname.runtime</tib:cmName>
   <!--Optional:-->
   <tib:ledgerName>c:/file.txt</tib:ledgerName>
   <!--Optional:-->
   <tib:requestOld>false</tib:requestOld>
   <!--Optional:-->
   <tib:syncLedger>false</tib:syncLedger>
   </tib:TibRVDynamicProperties>

  Back to Top       Previous  Next