Enterprise RTView® 
User Guide


Defining Transactions

Transactions for the Transaction Monitor, Transaction Display Generator and Transaction Simulator must be defined in the TRANSACTIONS.ini file, which can be modified with any text editor (such as Windows Notepad). If no directory has been specified for initialization files and this file is not found in the directory where you started the current application, then the Transaction Monitor will search under lib in your installation directory. The Transaction Display Generator and the Transaction Simulator will only search for TRANSACTIONS.ini in the directory where they are started. The Transaction Monitor, Transaction Display Generator and Transaction Simulator must access this initialization file to function properly. NOTE: When you start an Enterprise RTView application from the Windows Start menu, it runs from the demos directory.

NOTE:

The TRANSACTIONS.ini file can contain any number of transaction definitions. A transaction definition is a list of two or more JMS or TIBCO Rendezvous messages that describe a business event. These messages are listed in the order they are expected to execute. Each pair of messages makes up an interface. Each transaction definition may contain any number of interfaces, but each interface must be defined by exactly two JMS or TIBCO Rendezvous messages. Each definition must begin with a startBusTransaction keyword and the transaction name, which must be followed by the msg lines containing the two JMS destinations or TIBCO Rendezvous subjects that define the first interface. The interface keyword is used to associate the previous two msg lines with the interface name. Subsequent interfaces must contain only one new msg line because the ending message of the previous interface serves as the beginning message of the next interface. Each message must be followed by the field in that message which contains the unique ID that will be used to track each transaction. The endBusTransaction keyword must be used to end each transaction definition. Any parameters in TRANSACTIONS.ini which contain spaces must be enclosed in single quotes. The following transaction definition describes a business transaction that is made up of 3 messages, messageA, messageB, and messageC:

startBusTransaction MyTransaction
msg messageA idA
msg messageB idB
interface intAB
msg messageC idC
interface intBC
endBusTransaction

The following options are available in your transaction definition:

A table of supported keywords for transaction definitions is provided at the bottom of this page for reference.

The same TRANSACTIONS.ini can be used for the Transaction Monitor, Transaction Display Generator and Transaction Simulator. Additional keywords are supported for the Transaction Display Generator and some options are ignored for both the Transaction Display Generator and Transaction Simulator. See the Defining Transactions For the Transaction Display Generator and Defining Transactions for the Transaction Simulator sections below for more information.

Specifying a Data Source

The Transaction Monitor supports both JMS and TIBCO Rendezvous messages. By default, the Transaction Monitor listens for all transaction messages using JMS. To use TIBCO Rendezvous as the default, set the defaultds option to be rv in TMOPTIONS.ini or on the command line. 

In addition to setting the default data source, you can also specify a data source to use per transaction or per message in a transaction. This allows you to monitor transactions that are made up of a combination of JMS and TIBCO Rendezvous messages. To use a different data source than the default for a single message or transaction, use the keyword ds followed by jms for JMS or rv for TIBCO Rendezvous on the startBusTransaction or msg lines in your transaction definition. For example:

startBusTransaction MyTransaction ds:jms
msg ds:rv myMessage myID

Specifying a Connection
For both JMS and TIBCO Rendezvous messages, the connection information specified in TMOPTIONS.ini is used by default. If no connection information is specified, the Transaction Monitor will use the following defaults:

JMS - TIBCO EMS connection on localhos
TIBCO Rendezvous – default service, network and daemon for your TIBCO Rendezvous installation

In addition to specifying a default connection, you can also specify a different JMS connection or TIBCO Rendezvous transport per transaction definition or per message definition. This allows you to monitor transactions made up of messages on multiple JMS connections and on multiple TIBCO Rendezvous transports. To specify a connection to use for a single transaction, use the keyword transConnection followed by the information for your data source on the line below startBusTransaction in the transaction definition.To specify a different connection to use for a single message within a transaction, use the keyword msgConnection followed by information for your data source on the line below the msg line. For both transConnection and msgConnection, the following must be used after the keyword:

JMS – factory_class_name server_url user_name password client_id
TIBCO Rendezvous – service network daemon
Use a – (dash) to specify no argument for any of the above values

For example, a JMS connection:

startBusTransaction MyTransaction
transConnection com.tibco.tibjms.TibjmsTopicConnectionFactory tcp://myserver:7022 - - transClient
msg messageA idA 
msgConnection com.tibco.tibjms.TibjmsTopicConnectionFactory tcp://myserver2:7022 - - transClient2
msg messageB idB
interface intAB
endBusTransaction

For example, a TIBCO Rendezvous connection:

startBusTransaction MyTransaction
transConnection 5555 - tcp:5555
msg messageA idA
msgConnection 7777 - tcp:7777
msg messageB idB
interface intAB
endBusTransaction

In both examples above, the msgConnection applies to messageA only.

Specifying an Active Transaction Limit or Expiration
It is possible to restrict (per transaction definition) the number of active transactions or limit the time a transaction can process before it is marked EXPIRED. If the number of active transactions exceeds the value set for activetranslimit, then the Transaction Monitor will expire enough transactions (starting with the oldest transaction) to reduce the count to less than the limit. If the time limit set (in milliseconds) for activetranstimelimit is exceeded by a PROCESSING transaction, then it will expire. NOTE: These settings are optional. To set a default limit for all transaction definitions you can configure these options in TMOPTIONS.ini or from the command line. For example:

startBusTransaction MyTransaction
activetranslimit 216000
activetranstimelimit 
msg messageA idA
msg messageB idB
interface intAB
msg messageC idC
interface intBC
endBusTransaction

Specifying Messages and Message IDs
Messages must be TIBCO Rendezvous subjects or JMS topics, except in the case of TIBCO EMS, which supports queues and temporary destinations. Each message line must start with the keyword msg, and be followed by the topic or subject name and one or more message ids. The fields that follow message topics\subjects are used to form a unique tracking ID for each transaction. You can specify multiple fields separated by spaces. In this case, the values in each field will be concatenated to make the tracking ID. The field containing the tracking ID can be nested by separating the fields in the path to the nested field by ::. For example: 

startBusTransaction MyTransaction
msg messageA idA
msg messageB idB idB1
interface intAB
msg messageC idC::orderID
interface intBC
endBusTransaction

The fields containing the tracking ID maybe different for each message. For example, in the definition above, the following message fields are used to get the tracking ID from each message in the transaction:

idA = tracking_id1
idB idB1 = tracking_id2
idC::orderID = tracking_id3
Since all these messages belong to the same transaction, the concatenation of all fields (per message) must result in the same tracking ID:
tracking_id1 = tracking_id2 = tracking_id3
If the tracking ID is contained in a JMS TextMessage, use <TEXT> for the message field name:

msg msgA <TEXT>

If a tracking ID within your message is contained in XML data, then you must add the $xml: prefix to the name of the message field that contains the XML data. This field should be followed by the list of XML tags in hierarchical order ending in the tag that contains the tracking ID.

For example, the invoice_data message field contains the following XML:

<InvoiceData>
    <InvoiceID>tracking_id4</invoiceID>
</InvoiceData>
To use the value of InvoiceID as your tracking ID, you would specify this message in TRANSACTIONS.ini as follows:

msg messageA $xml:invoice_data::InvoiceData::InvoiceID

If the tracking ID within your message is contained in an XML attribute, add :$attrib=attribute_name to the end of the XML field containing the attribute.

For example, the invoice_data message field contains the following XML:

<InvoiceData>
    <InvoiceID id="tracking_id4"/>
</InvoiceData>
To use the value of the id attribute in the InvoiceID field as your tracking ID, you would specify this message in TRANSACTIONS.ini as follows:
msg msgA $xml:invoice_data::InvoiceData::InvoiceID:$attrib=id

To use the value of a JMS message header field as your tracking ID, add the $header prefix to the name of the header field:

        msg msgA $header:JMSCorrelationID

To use the value of a JMS message property field as your tracking ID, add the $prop prefix to the name of the property field:

        msg msgA $prop:senderID

Using Queue Messages (supported for TIBCO EMS only)
For TIBCO EMS connections, queues can also be used. Queue messages are not consumed. To specify a queue in the msg line, precede the queue name with QUEUE:. For example

    msg QUEUE:status.process.queue $prop:ID

For queues, the TIBCO system monitor messages are used to get the message, so in order to use these in your transactions, you must use a connection that has permission to receive system monitor messages. The connection must be to the EMS server that sends the message (ie the home server for the queue). NOTE: It is not possible to parse the message body content of the original message from the system monitor message, so the id fields for queues must be JMS property or header fields.

For each queue in a transaction definition, a subscription to the corresponding system monitor message is made. For example, if status.process.queue is specified for the queue, a subscription will be made to $sys.monitor.Q.r.status.process.queue.

The system monitor messages generate additional overhead on your EMS server, see your TIBCO documentation for more information. Note that TIBCO does not guarantee system monitor messages, so we may not receive system monitor messages for some queue messages. This means that the Transaction Monitor may report that a transaction is stalled, when it actually completed. The system monitor messages may also not be sent at the same time as the original message, so the latency values my not be accurate. There is no workaround for this. However, in most cases, they will be sent at about the same time the original message was sent.

NOTE: Queues are only supported on TIBCO EMS connections.

Using Temporary Destinations (supported for TIBCO EMS only)
For TIBCO JMS connections, temporary destinations can also be used. To specify a temporary destination, use the TEMP_DEST keyword:

    msg TEMP_DEST $prop:ID

NOTE: You cannot use a temporary destination for the first message in a transaction.

For temporary destinations, the TIBCO system monitor messages are used to get the message, so in order to use these in your transactions, you must use a connection that has permission to receive system monitor messages. The connection must be to the EMS server that sends the message (ie the home server for the queue or temporary destination). NOTE: It is not possible to parse the message body content of the original message from the system monitor message, so the id fields for temporary destinations must be JMS property or header fields.

Since the Transaction Monitor does not know in advance which destination a temporary destination will resolve to, it will subscribe to the system monitor messages for all temporary destinations on the each connection in your transaction definition that contains a temporary destination. When the message previous to the temporary destination message in the transaction definition is received, the Transaction Monitor will get the destination from the JMSReplyTo property to determine which temporary destination will be used for the next message in the transaction. This destination is always on the same server that sent the message, so the connection for temporary destination, as well as the previous message containing the JMSReplyTo value, must be to the server that sent the message (ie the home server for the topic or queue). 

By default, if a transaction definition contains a temporary destination the Transaction Monitor will subscribe to these system monitor messages

        $sys.monitor.Q.r.$TMP$.>
   
     $sys.monitor.T.r.$TMP$.>

The system monitor messages generate additional overhead on your EMS server, see your TIBCO documentation for more information. Note that TIBCO does not guarantee system monitor messages, so we may not receive system monitor messages for some queue or temporary destination messages. This means that the Transaction Monitor may report that a transaction is stalled, when it actually completed. The system monitor messages may also not be sent at the same time as the original message, so the latency values my not be accurate. There is no workaround for this. However, in most cases, they will be sent at about the same time the original message was sent.

You can narrow down the number of system monitor messages that will be sent to the Transaction Monitor by specifying that you only want to listen for temporary topics or temporary queues instead of both. You can also narrow down the number of system monitor messages that will be sent by specifying a more specific destination.  See the tempdest and tempdestmode options in TMOPTIONS.ini or from the command line for more information.

Since TIBCO does not guarantee that the system monitor temporary destination message will arrive after the previous message in the transaction, the Transaction Monitor will store all temporary destination messages that it receives that do not already have a listener. In order to prevent a memory problem, temporary destination messages that have been stored for 5 minutes without any listeners registering for them are removed. This time limit can be changed by using the tempdestexpire option in TMOPTIONS.ini or from the command line line

The Transaction Monitor assumes that it will not have multiple transaction instances using the same temporary destination at the same time. For example, the JMSReplyTo value for the message before the temporary destination resolves to a destination $TMP$.12345. If the Transaction Monitor has received a message from that destination that has not expired, it is assumed to be the correct message for the transaction. If the Transaction Monitor has not yet received a message from $TMP$.12345, it will assume that the next message that comes in from that destination is the correct message for the transaction.

NOTE: Temporary destinations are only supported on TIBCO EMS connections.

Re-using Messages in Transactions
The Transaction Monitor supports re-using the same message within the same transaction and between multiple transactions. If you are going to use the same message in multiple transactions, but only once per transaction, you do not need to specify any special syntax as long as the message is only used as the first message in one transaction. 

In order to use the same message as the first message in multiple transaction definitions, you will need to specify a transDefField and transDefValue. The Transaction Monitor will use this to determine which transaction definition a message belongs to. The transDefField must go at the beginning of the TRANSACTIONS.ini before the first transaction definition. It must contain the name of the message and the field in the message that the Transaction Monitor can use to determine which transaction that message belongs to. The transDefField can be a top level, nested, xml, jms header or jms property field. The syntax for specifying nested, xml, jms header and jms property fields is the same as the message ID described above. The transFieldValue must go before the first msg definition in the transaction definition and must be followed by the value that it will contain if it is to be used for that transaction. For example:

transDefField messageA transType

startBusTransaction MyTransaction1
transDefValue:tran1
msg messageA idA
msg messageB idB
interface intAB1
msg messageC idC
interface intBC1
endBusTransaction

startBusTransaction MyTransaction2
transDefValue:tran2
msg messageA idA
msg messageB idB
interface intAB2
msg messageC idC
interface intBC2
endBusTransaction

In the example above, messageA is used as the first message in both MyTransaction1 and MyTransacton2. When the Transaction Monitor receives messageA, it will use the value in the transType field to determine which transaction to start.

In order to use the same message multiple times within a single transaction, you will need to specify a msgOrderField and msgOrderValue. The Transaction Monitor will use this to determine which interface to start or update and whether or not the messages are coming in the correct order. The msgOrderField definition must go at the beginning of the TRANSACTIONS.ini before the first transaction definition. It must contain the name of the message and the field in the message that the Transaction Monitor can use to determine which position in the transaction that instance represents.  The msgOrderField can be a top level, nested, xml, jms header or jms property field. The syntax for specifying nested, xml, jms header and jms property fields is the same as the message ID described above. The msgOrderValue must go in the msg definition within the transaction definition and must be followed by the value that it will contain. For example:

msgOrderField messageA orderField

startBusTransaction MyTransaction
msg messageA idA msgOrderValue:1
msg messageA idA msgOrderValue:2
interface intA1
msg messageA idA msgOrderValue:3
interface intA2
endBusTransaction

In the example above, the messageA message is used 3 times within the same transaction. When the Transaction Monitor receives messageA, it will use the value in the orderField to determine which interface to start or update.

Defining Transactions For the Transaction Display Generator
The Transaction Display Generator requires that TRANSACTIONS.ini contain extra information that is used to determine the names of the generated display files and the names and formatting of objects within the generated displays. The previous transaction definition example with the additional fields for the Transaction Display Generator contains the following (new fields are bolded):

startBusTransaction 'Update Purchase Order' Siebel RR upo
msg sl.customers.po.update.Siebel ^customer^ ^date^
msg sl.customers.po.update.Oracle ^request_id^ ^serial_no^
interface Siebel-Oracle-Siebel Oracle 1
msg sl.customers.po.update.Siebel.final ^order_id^
interface Oracle-Siebel-RR Siebel 1
endBusTransaction

This transaction definition causes the Transaction Display Generator to create a new display named ti_upo.rtv, using the last field in the startBusTransaction line. This display contains four components. The start component is named Siebel (the third field in the startBusTransaction line) and the end component is named RR (the fourth field in the startBusTransaction line).  There are two intermediate components named Oracle and Siebel (the third argument in the interface line). The color of the header on objects representing the Oracle and Siebel components will be black due to the 1 at the end of the interface lines. The 1 is optional and if it is not specified, the color of the header on objects will be gray. For more information on creating generated displays, see Transaction Display Generator.

Defining Transactions for the Transaction Simulator
The transaction simulator will generate messages for the transactions specified in your TRANSACTIONS.ini. It only supports a single data source and connection. It does not support generating queue or temporary destination messages. It does not support generating transactions that use the same message multiple times. The message id in TRANSACTIONS.ini is ignored. The message id field for all messages is a top level field named ID. For more information on simulating transactions, see Transaction Simulator. You can also simulate transactions by sending JMS or TIBCO Rendezvous messages from the Display Builder or Display Viewer. See the Define Command section for JMS or TIBCO Rendezvous for more information on how to send messages.

Table of Supported Keywords for Transaction Definitions
Transaction definitions must follow exactly the syntax listed in the table below or the Transaction Monitor will be unable to read TRANSACTIONS.ini and cannot function properly. If any string argument contains spaces, it must be encompassed by single quotes (e.g., 'New Service Order'). If the file is UTF-8 encoded, you may use non-western characters.
 

Keyword Description Example
transDefField The name of the field in the message the Transaction Monitor should use to determine which transaction definition this message belongs to. This keyword is followed by the message name and field name. This is only needed when multiple transactions start with the same message. transDefField messageA transTypeField
msgOrderField The name of the field in the message that the Transaction Monitor should use to determine which interface to update within a transaction definition. This keyword is followed by the message name and field name. This is only needed when the same message is used multiple times within a single transaction definition. msgOrderField messageA msgOrderField
startBusTransaction <ds><transaction name> <start component name> <end component name> <generated display file name suffix> Marks the beginning of a transaction definition.  The name of the transaction must follow. To overwrite the default data source, set the defaultds option to be rv in TMOPTIONS.ini or on the command line.

If you are using the Transaction Display Generator, the names for the start component, end component and display file name suffix must follow the transaction name.

startBusTransaction  ds:rv 'Update Purchase Order'
startBusTransaction  Shipment
transConnection Overrides the application default connection for the transaction definition. For JMS the factory class name, server URL, user name, password and client ID must follow.

For TIBCO Rendezvous the service, network and daemon for the transport must follow. Use - to use the TIBCO Rendezvous default for an argument.

JMS example:
transConnection com.tibco.tibjms.TibjmsConnectionFactory tcp://myserver:7222 user1 pass1 client1

TIBCO Rendezvous example:
transConnection 5555 - - 

transDefValue The value that the transDefField will equals if the message is to be used in this transaction.  This is only needed when multiple transactions start with the same message. transDefValue trans1
activetranslimit Number of active transactions, for this transaction definition, stored by the Transaction Monitor. If the number of active transactions exceeds the limit, the Transaction Monitor will expire enough transactions to reduce the transaction count to the limit. The oldest transactions will expire first.  Once a transaction has expired, it will be output in the next update with the status EXPIRED, and will no longer be tracked.

NOTE: These settings are optional. To set a default limit for all transaction definitions you can configure these options in TMOPTIONS.ini or from the command line. If no default is set, then no transactions will expire.

activetranslimit 10
activetranstimelimit (milliseconds) Time limit for active transactions, for this transaction definition, stored by the Transaction Monitor. If the time limit is exceeded by a PROCESSING transaction, then it will be output in the next update with the status EXPIRED and will no longer be tracked. 

NOTE: These settings are optional. To set a default limit for all transaction definitions you can configure these options in TMOPTIONS.ini or from the command line. If no default is set, then no transactions will expire.

activetranstimelimit 5000
msg <subject name> <ID1> <ID2> ... Specifies the JMS topic or TIBCO Rendezvous message subject and one or more ID fields defining the unique tracking ID of an individual transaction. NOTE: The first message subject in a definition cannot be used as the first message subject in any other definition.

For TIBCO JMS connections, you may also specify queues or temporary destinations. To specify a queue, preceed the queue name with QUEUE:. For temporary destinations, use the TEMP_DEST keyword instead of a topic name. NOTE: The first message in a transaction cannot be a temporary destination.

If this message will be used multiple times within a single transaction defintion, include the msgFieldValue that this message will contain.

At least one message field must be listed as an argument. If more than one field is specified, a unique tracking ID will be constructed using the concatenation of all fields specified. NOTE: For queues and temporary destinatios the ID must be in a JMS header or property.

If the message is a JMS TextMessage, use <TEXT> as the field name. 

If the field containing the tracking ID is part of a nested message, then the parent field(s) must be specified as well, separated by a ::.

If the field containing tracking ID is in XML data within your message, then add the $xml: prefix to the message field that contains the XML data (followed by the list of XML tags in hierarchical order). 

If the tracking ID within your message is contained in an XML attribute, add :$attrib=attribute_name to the end of the XML field containing the attribute. 

If the tracking ID within your message is contained in a JMS header field, add the $header: prefix to the name of the header field.

If the tracking ID within your message is contained in a JMS property field, add the $prop: prefix to the name of the property field.

msg SL.DEV.NEW.ORACLE.01 ^data^::^process_id^::^trans_id^
msg sl.customers.po.new.Siebel ID ORDERNUM
msgConnection Overrides application default connection and the transaction definition connection for the message on the previous line. For JMS the factory class name, server URL, user name, password and client ID must follow. 

For TIBCO Rendezvous the service, network and daemon for the transport must follow. Use - to use the TIBCO Rendezvous default for an argument.

JMS example:
msgConnection com.tibco.tibjms.TibjmsConnectionFactory tcp://myserver:7222 user1 pass1 client1

TIBCO Rendezvous example:
msgConnection - - tcp:8999

interface <interface_name> <component name> <black header flag> Marks the end of the interface definition. The name of the interface must follow. If you are using the Transaction Display Generator, the name of the component that corresponds with this interface must follow the interface name. 

If you would like the object that represents the component to have a black header, follow the component name with a 1. Default is gray.

interface  Siebel-Oracle-Siebel
endBusTransaction Marks the end of a transaction definition. No argument needed
# Marks the line as a comment. #My custom transaction defined below

 
 
 
 

 
SL, SL-GMS, GMS, Enterprise RTView, SL Corporation, and the SL logo are trademarks or registered trademarks of Sherrill-Lubinski Corporation in the United States and other countries. Copyright © 1998-2008 Sherrill-Lubinski Corporation. All Rights Reserved.

 
JMS, JMX and Java are trademarks and/or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. They are mentioned in this document for identification purposes only.