Using Integration Controls

     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) Control in Oracle 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.

Disclaimer

Use of the TIBCO control and event generator with Oracle 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 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 control within Oracle WebLogic Integration.

Creating and Configuring a New Instance of the TIBCO Control

Describes how to create and configure a new TIBCO 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 control properties at run time.

 


Overview: Rendezvous Control

The TIBCO control enables Oracle 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 control, you can send and receive messages in XML, String and TIBCO proprietary Rendezvous Message (TibrvMsg) formats. You can specify TIBCO control properties while configuring Rendezvous control or dynamically at run time. Following are some of the other features of TIBCO control:

The TIBCO control complements the other controls provided in Oracle WebLogic Integration, and can be used with other Oracle WebLogic Integration business processes. To learn more, see Using Controls in Business Processes in Using Integration Controls.

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

 


Creating and Configuring a New Instance of the TIBCO Control

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

Describes how to add a new TIBCO control.

To Specify TIBCO Control General Settings

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

To Specify TIBCO Control Advanced Settings

Describes how to configure Certified Message settings for the TIBCO control.
Prerequisites before creating Tibco Control

Before creating the TIBCO Control, perform the following:

  1. Install and configure TibcoRV on your machine. Ensure that the installation directory should be in server PATH.
  2. Enter the tibjrv.jar in the CLASSPATH: EXT_PRE_CLASSPATH=D:\Installs\TIBCO\TIBRV\lib\tibrvj.jar;%EXT_PRE_CLASSPATH% .
  3. TIBCO installation bin and lib folder should be there in PATH and LD_LIBRARY_PATH respectively.
  4. export LD_LIBRARY_PATH=/opt/tibco/tibrv/lib:$LD_LIBRARY_PATH

    export PATH=/opt/tibco/tibrv/bin:$PATH

To Add a New TIBCO Control

To add a new TIBCO control to Oracle WebLogic Integration, perform the following steps:

  1. In the Package Explorer pane, double-click the business process (Process.java file) to which you want to add the Tibco control. The business process is displayed in the Design view.
  2. Click Insert TIBCO Control - Advanced Settings 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 Oracle Workshop for WebLogic, click Window > Show View > Data Palette from the menu bar.
  4. Select Tibco.
  5. The Insert control: Tibco dialog box appears.

  6. 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 insertion node, you want to add the control.
    • To make this a control factory select the Make this a control factory that can create multiple instances at runtime check box, otherwise clear the check box.
    • Click Next.
    • The Create Control dialog-box appears.

  7. In the Create Control dialog box enter the following details:
    • In the Name field, type the name of your new control extension file.
    • Decide whether you want to add comments as configured in the properties of the current project and select or clear the Generate comments check box.
    • Click Next.
    • The Insert control- Tibco dialog-box appears.

  8. In the Insert control- Tibco dialog box enter the following details:
To Specify TIBCO Control General Settings
To Specify TIBCO Control Advanced Settings

To specify certified messaging settings for the TIBCO control, perform the following tasks in Step 3 of the Insert Control - TIBCO dialog; the Advanced Settings tab, (see Figure 16-1) below:

Figure 16-1 Insert TIBCO Control - Advanced Settings

Insert TIBCO Control - Advanced Settings

 


The Java Files for a TIBCO Control

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

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

Sample control File for a TIBCO Control Using Certified Messaging
package requestquote;
/*
 * An extended TibcoRV control.  
 */           
@org.apache.beehive.controls.api.bean.ControlExtension
@com.bea.control.TibcoRV.Transport(service="7500",network="beaserv1",daemon="beasever1:7500")
@com.bea.control.TibcoRV.CMTransport(cmname="new",ledgername="Ledger",requestold=true,syncledger=true)
@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 control File for a TIBCO Control Without Certified Messaging
package requestquote;
/*
 * An extended TibcoRV control.  
 */
@org.apache.beehive.controls.api.bean.ControlExtension
@com.bea.control.TibcoRV.Transport(service = "7500", network = "beaserv1", daemon = "beasever1:7500")
@com.bea.control.TibcoRV.CMTransport(cmname = "", ledgername = "", requestold = false, syncledger = false)
@com.bea.control.TibcoRV.UseCM(false)
public interface TibcoRV extends com.bea.control.TibcoRV {
	static final long serialVersionUID = 1L;
	public TibcoRV 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 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 control subscribes to two confirmation advisories: _RV.INFO.RVCM.DELIVERY.COMPLETE.> and _RV.ERROR.RVCM.DELIVERY.FAILED.>.

Note: A TIBCO 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 control sendMessage function to a business process.

  1. Open the Client Request node.
  2. In the General Settings tab, enter a name for the new method.
  3. Click Add, and select the Java check box in the pop-up dialog.
  4. Select String from the Java Types list and enter a name for the variable in the Name field.
  5. Click OK to add your selection to the Client Request node. This represents the message for the sendMessage function.
  6. 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.
  7. 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.
  8. Close the Client Request node.
  9. Drag and drop the Perform node from the Process Nodes Palette and convert the message data from String to TibrvMsg format. See sample code below:
  10. // 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);
    }
  11. Drag and drop the sendMessage function from the Controls tab in the Data Palette into your business process, just below the Client Request node.
  12. 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.
  13. 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 Event Generator utility. For details, refer to TIBCO Rendezvous Event Generator.

 


Setting Dynamic Properties

You can change the TIBCO control properties dynamically at runtime. The TIBCO control properties that you can modify are specified in the TibRVDynamicPropertiesDocument type document. This document conforms to the TIBCO Control Dynamic Properties schema, which is available in the jpdpublic.jar file located in BEA_Home\wli_10.3\lib.

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

  1. Open the Client Request node.
  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 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 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 Control Dynamic Properties Document

The following is a sample TIBCO 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