Académique Documents
Professionnel Documents
Culture Documents
Messaging Adapter
Users Guide
Software Release 4.9
November 2010
Important Information
SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED
OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED
ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED
SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FOR
ANY OTHER PURPOSE.
USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A
LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE
AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USER
LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THE
SOFTWARE (AND WHICH IS DUPLICATED IN LICENSE FILE) OR IF THERE IS NO SUCH SOFTWARE
LICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATED
IN THE LICENSE FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS
AND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN
AGREEMENT TO BE BOUND BY THE SAME.
This document contains confidential information that is subject to U.S. and international copyright laws and
treaties. No part of this document may be reproduced in any form without the written authorization of TIBCO
Software Inc.
TIBCO, The Power of Now, TIBCO ActiveMatrix BusinessWorks, TIBCO Rendezvous, TIBCO Adapter, TIBCO
AdapterAdministrator, TIBCO Repository, and TIBCO Hawk are either registered trademarks or trademarks of
TIBCO Software Inc. in the United States and/or other countries.
EJB, Java EE, J2EE, and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the U.S. and other countries.
All other product and company names and marks mentioned in this document are the property of their
respective owners and are mentioned for identification purposes only.
THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALL
OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAME
TIME. SEE THE README FILE FOR THE AVAILABILITY OF THIS SOFTWARE VERSION ON A SPECIFIC
OPERATING SYSTEM PLATFORM.
THIS DOCUMENT IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS.
CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE
INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE
IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN
THIS DOCUMENT AT ANY TIME.
THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR
INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING
BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.
Copyright 1999-2010 TIBCO Software Inc. ALL RIGHTS RESERVED.
TIBCO Software Inc. Confidential Information
| iii
Contents
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .vii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
TIBCO Hawk Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Other TIBCO Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Third-Party Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Connecting with TIBCO Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiv
How to Join TIBCOmmunity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiv
How to Access All TIBCO Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiv
How to Contact TIBCO Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiv
Chapter 1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Functional Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
The TIBCO Rendezvous System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
The TIBCO Hawk System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
AMI Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Benefits of Monitoring with the TIBCO Rendezvous System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Chapter 2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Installing on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Installation Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
After Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Uninstalling the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Installing a Custom Adapter as a Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Installing on UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Installation Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Transcript of the Solaris installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
After Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
TIBCO Hawk Rendezvous Messaging Adapter Users Guide
iv
|
Uninstalling the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
38
38
39
40
40
54
54
56
58
64
65
66
67
68
|v
getTraceLevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
setTraceLevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
getMaxThreads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
setMaxThreads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tibrvsend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
tibrvlisten . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
dynamicSubscriber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
_onUnsolicitedMsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
69
70
71
72
73
74
75
76
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
vi
| vii
Tables
Table 1
Table 2
Table 3
Table 4
Table 5
Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Table 6
Table 7
Table 8
Table 9
Table 10
Table 11
Table 12
Table 13
Table 14
Table 15
Table 16
Table 17
JVM Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
viii
| ix
Preface
The TIBCO Hawk Rendezvous Messaging Adapter allow TIBCO Hawk to send
and receive custom TIBCO Rendezvous messages. Using XML configuration
files, you can specify the subject and message structure to be sent or received for
each method, then use TIBCO Hawk to execute the method. The adapter also
provides a set of built-in methods to monitor TIBCO Rendezvous messages.
This manual assumes you are familiar with the TIBCO Rendezvous and TIBCO
Hawk environments.
Topics
| Related Documentation
Related Documentation
This section lists documentation resources you may find useful.
TIBCO Hawk Installation and Configuration Read this book first. It contains
step-by-step instructions for installing TIBCO Hawk software on various
operating system platforms. It also describes how to configure the software
for specific applications, once it is installed. An installation FAQ is included.
TIBCO Hawk Programmers Guide All programmers should read this manual.
It covers the AMI protocol, AMI messages, the AMI Workbench development
tool, and the TIBCO Hawk security framework and its classes. Programmers
should then refer to the appropriate language reference for the AMI API. The
TIBCO Hawk Application Management Interface (AMI) exposes internal
application methods to TIBCO Hawk.
TIBCO Hawk AMI Java Reference Contains detailed descriptions of each class
and method in the TIBCO Hawk Java AMI API.
Preface xi
TIBCO Hawk Release Notes Read the release notes for a list of new and changed
features. This document also contains lists of known issues and closed issues
for this release.
TIBCO Rendezvous
TIBCO Rendezvous Concepts
TIBCO Rendezvous Administration
TIBCO Rendezvous Configuration Tools
TIBCO Administator
TIBCO Administrator Installation Guide
Third-Party Documentation
You may find the following third-party documentation useful.
xii
| Typographical Conventions
Typographical Conventions
The following typographical conventions are used in this manual.
Table 1 General Typographical Conventions
Convention
Use
TIBCO_HOME
Many TIBCO products CAN be installed within the same directory. This
directory is referenced in documentation as TIBCO_HOME. The value of
TIBCO_HOME depends on the operating system. For example, on Windows
systems, the default value is C:\tibco.
Incompatible products and multiple instances of the same product should be
installed into different installation environments.
CONFIG_FOLDER
HAWK_HOME
code font
bold code
font
In large code samples, to indicate the parts of the sample that are of
particular interest.
Preface xiii
Use
italic font
Key
combinations
To introduce new terms For example: A portal page may contain several
portlets. Portlets are mini-applications that run in a portal.
Key name separated by a plus sign indicate keys pressed simultaneously. For
example: Ctrl+C.
Key names separated by a comma and space indicate keys pressed one after the
other. For example: Esc, Ctrl+Q.
The note icon indicates information that is of special interest or importance, for
example, an additional action required only in certain circumstances.
The tip icon indicates an idea that could be useful, for example, a way to apply
the information provided in the current section to achieve a specific result.
The warning icon indicates the potential for a damaging situation, for example,
data loss or corruption if certain steps are taken or not taken.
xiv
If you already have a valid maintenance or support contract, visit this site:
https://support.tibco.com
Entry to this site requires a user name and password. If you do not have a user
name, you can request one.
|1
Chapter 1
Introduction
Topics
Overview, page 2
Architecture, page 3
| Introduction
Overview
TIBCO Hawk monitors systems and applications and uses TIBCO Rendezvous to
communicate with the agents. The TIBCO Hawk Rendezvous Messaging Adapter
(adapter) adds to TIBCO Hawk the ability to send and receive TIBCO
Rendezvous messages. The adapter also provides a set of built-in methods to
monitor TIBCO Rendezvous messages. Using XML configuration files, you can
specify the subject and message structure to be sent or received for each method,
then use TIBCO Hawk to execute the method.
The adapter can be used to:
Monitor applications that are not TIBCO Hawk-enabled, but publish TIBCO
Rendezvous messages.
Provide "action methods" for TIBCO Hawk rulebases to send user specified
messages. Typical scenarios are:
Notifying other applications of an error condition. A rulebase detects an
error condition and uses the adapter to call a user-defined method that
sends a message to applications about the error condition.
Distributing data collected by other TIBCO Hawk methods to applications.
The adapter can send TIBCO Rendezvous messages to other applications
using a user-defined method.
Architecture 3
Architecture
The TIBCO Hawk Application Management Interface (AMI), a protocol for
communicating between a TIBCO Hawk Agent and other applications, enables an
external system to be monitored using TIBCO Hawk software. When you start the
adapter, it uses AMI to exchange messages with a TIBCO Hawk Agent using
TIBCO Rendezvous software. All communication between TIBCO Hawk product
components is provided by TIBCO Rendezvous software.
The adapter is a TIBCO Rendezvous subscriber and publisher. Like other TIBCO
Rendezvous programs, it sends and receives messages using subject-based
addressing. Each instance of the adapter maintains a one or many TIBCO
Rendezvous sessions. Multiple adapter instances can run on the same network or
the same machine providing fault-tolerance, load-balancing, or added security.
The following diagram shows adapter interaction with TIBCO Hawk, TIBCO
Rendezvous and other applications.
Figure 1 Architecture
Application
Application
Application
Adapter
Adapter
TIBCO Rendezvous
TIBCO Hawk
Agent
TIBCO Hawk
Display
TIBCO Hawk
Agent
TIBCO Hawk
Display
Configuration details for the adapter are stored in an XML file that is flexible and
easy to modify. The file contains XML elements and attributes that define custom
TIBCO Hawk microagents for processing TIBCO Rendezvous messages. Syntax
rules are defined in an external DTD, so a third-party validating parser can be
used to validate the XML before it is used.
When the adapter is started, it parses and loads the configuration file. Using
values specified in the file, the adapter dynamically builds microagents and
methods.
| Introduction
All results returned by the adapters running on the same machine can be accessed
by the local TIBCO Hawk Agent. Data returned by one instance of the adapter can
be used as the data source of another rule. The TIBCO Hawk Agent can then
apply logic to the results and possibly take action. The action can be another
method invocation, such as sending a TIBCO Rendezvous message.
Like other microagents, the adapter uses AMI to communicate directly with the
TIBCO Hawk Agent on the local node. The adapter microagents expose interfaces
with methods and arguments so you can manage its activities from TIBCO Hawk
Display. For more information, see Adapter Methods Reference on page 63. For
more information about TIBCO Hawk Agents, microagents, and TIBCO Hawk
Display, see the TIBCO Hawk Administrators Guide.
Functional Components 5
Functional Components
This section provides a general overview of each product component used by the
TIBCO Hawk Rendezvous Messaging Adapter.
| Introduction
The TIBCO Hawk Display application is the primary means of interacting with
managed objects on your network. The main window of the TIBCO Hawk
Display graphically represents system behavior with each monitored node
represented by a container icon. Alert messages published by TIBCO Hawk
Agents on TIBCO Rendezvous software are also displayed. All Display users can
view the same managed objects without complicated configuration schemes, and
each user can customize the interface without affecting others. For more
information, see the TIBCO Hawk Administrators Guide.
AMI Protocol
The TIBCO Hawk Application Management Interface (AMI) is an open, TIBCO
Rendezvous-based protocol for instrumenting an application with a powerful
management interface. Using AMI, applications can be monitored and controlled
internally using TIBCO Hawk software in the same way as any other system
component. The protocol allows for complete independence between the TIBCO
Hawk Agent and the managed application with two-way dynamic discovery.
AMI features are:
AMI API libraries, which implement the protocol, are provided in C, C++ and
Java. Direct AMI using the TIBCO Rendezvous APIs are also supported in
ActiveX, and Perl.
AMI can be easily back-fitted into existing applications, even those that do not
currently utilize TIBCO Rendezvous software, and expose existing internal
application methods to a TIBCO Hawk Agent.
Functional Components 7
Applications in a TIBCO
Rendezvous network
communicate with location
transparency.
The publish-subscribe
interaction is more efficient than
sending many point-to-point
messages (polling, for example).
| Introduction
|9
Chapter 2
Installation
Topics
10
| Installation
Installing on Windows
Before starting the installation procedure, review the topics in this section to
determine that your system meets the basic requirements and that you have the
prerequisite software installed.
Although many of the examples in this book specifically refer to the Windows NT
platform, they also apply to the Windows 2000 platform.
System Requirements
The following system requirements are recommended. The actual requirements
depend on your application environment.
Software Requirements
The following software is required and must be installed before starting the
installation procedure:
Windows NT 4.0 with Service Pack 6 (build 1381) or above; or Windows 2000
(build 2195) Professional, Server, or Advanced Server.
TIBCO Hawk software, version 3.0.0 or higher. A TIBCO Hawk Agent must be
installed and running on the adapter machine.
Installation Steps
To run the adapter installation program, you must have administrative privileges
on the adapter machine.
Installing on Windows 11
After Installation
It is recommended that the users first start with the sample configuration files
present in the s a m p l e s directory to get familiar with the features of the adapter.
Before starting the adapter, the attributes values associated with the T I B H A W K _ A M I
elements in the sample configuration files may have to be updated. See Starting
and Stopping the Adapter on page 38 for details.
It is also recommended that users read the r v h m a . d t d file as it contains the
grammar rules and descriptions for adapter configurations which are important.
Click
12
| Installation
Installing a Custom Adapter as a Service
During installation, a default service can be installed. This instance of the adapter
uses the default configuration files. You can install an instance of the adapter that
uses a custom configuration file as a Windows Service. When writing custom
configuration files, we recommend you start by using the sample configuration
files in the < H A W K _ R O O T > \ a d a p t e r s \ r v h m a \ s a m p l e s directory.
You may have to modify the environment variable settings in the sample
configuration files before using them. See Overview on page 20 for details.
For a details on installing and uninstalling the adapter as a service, see
Appendix B on Page 79.
Installing on UNIX 13
Installing on UNIX
Before starting the installation procedure, review the topics in this section to
determine that your system meets the basic requirements and that you have the
prerequisite software installed.
System Requirements
One of the following operating system software is required:
Table 3 Supported UNIX PLatforms
Platform
OS Version
HP
IBM
AIX 4.3
SUN
Solaris 2.6, 7, 8
DEC
UNIX 4.0F
LINUX
x86
Solaris 7
Software Requirements
The following software is required and must be installed before starting the
installation procedure:
TIBCO Hawk software, version 3.0.0 or higher. A TIBCO Hawk Agent must be
installed and running on the adapter machine.
14
| Installation
Java Runtime Environment (JRE) 1.1.8 or above. The following table lists the
download sites for obtaining JRE for the supported UNIX platforms.
HP
www.hp.com/products1/unix/java
IBM
www.ibm.com/java/jdk/aix/supported/118ga/
SUN
www.sun.com/solaris/jre
DEC
www.compaq.com/java/download
LINUX
You can select a download site for the JRE for Linux from
www.blackdown.org/java-linux/mirrors.html
Installation Steps
To run the installation program, you must be a superuser on the adapter machine.
The software must be installed on a local disk.
1. Login to the machine where the adapter should be installed.
2. Uncompress the adapter package.
For example, on Solaris 2.x:
$ uncompress TIB_hawkrvhma_4.0.0_s4_56_CC.tar.Z
Installing on UNIX 15
16
| Installation
After Installation
1. Make sure JRE is installed on your system
2. Create the following environment variables:
Table 5 Environment Variables
Environment
Variable
HAWK_ROOT
RV_ROOT
JRE_ROOT
Description
Example
For csh:
For csh:
For csh:
For sh or ksh:
HAWK_ROOT=/opt/tibco/hawk;
export HAWK_ROOT
For sh or ksh:
RV_ROOT=/opt/tibco/rv; export
RV_ROOT
For sh or ksh:
JRE_ROOT=/opt/tibco/java; export
JRE_ROOT
PATH
Modify this
environment
variable to include
$HAWK_ROOT/bin
For csh:
setenv PATH
$HAWK_ROOT/bin:${PATH}
For sh or ksh:
PATH = $HAWK_ROOT/bin:${PATH};
export PATH
It is recommended that you first start with the sample configuration files present
in the s a m p l e s directory to get familiar with the features of the adapter. Before
using starting the adapter, the T I B H A W K _ A M I elements in the sample configuration
files may have to be updated. See TIBHAWK_AMI Element Attributes on page 21
for details
It is also recommended that you read the r v h m a . d t d file as it contains the
grammar rules and descriptions for adapter configurations which are important.
The file is located in the s a m p l e s directory.
Installing on UNIX 17
Command
HP
swremove Hawkrvhma
IBM
r m - r f < adapter-install-directory>
SUN
/usr/sbin/pkgrm Hawkrvhma
DEC
/usr/sbin/setld -d Hawkrvhma
LINUX
r m - f r < adapter-install-directory>
This command removes all files that were added during installation.
18
| Installation
| 19
Chapter 3
This chapter describes how to configure and begin using TIBCO Hawk
Rendezvous Messaging Adapter software.
Topics
Overview, page 20
20
The top level element, TIBHAWK_AMI describes TIBCO Rendezvous and tracing
attributes that can applied to all microagents. Some of the attributes can be
redefined for an individual microagent in the microagent element.
Table 7 TIBHAWK_AMI Element Attributes
Attribute
Type
Description
dtd_type
enume
ration
REQUIRED. (RVHMA).
dtd_version
enume
ration
REQUIRED. (1.0).
xml_file_version
string
22
Type
Description
ami_rvd_service
ami_rvd_network
ami_rvd_daemon
string
rvService
string
string
rvNetwork
rvDaemon
cmName
cmLedger
Type
Description
rvAdvisoryTraceLevel
enume
ration
rvAdvisoryForward
enume
ration
ftGroupName
string
ftWeight
string
ftActiveGoal
ftHeartbeatInterval
ftPrepInterval
ftActiveInterval
ftWeight 100.
ftActiveGoal 1
ftHeartbeatInterval 30 seconds
ftPrepInterval 60 seconds
24
Type
Description
traceFile
string
traceFileMaxSize
traceFileMaxNumber
traceLevel
name
string
help
string
displayName
string
rvService
string
rvNetwork
rvDaemon
cmName
string
cmLedger
maxThreads
string
26
traceFile
string
traceFileMax
Size
traceFileMax
Number
traceLevel
If a method has parameters, the method must have at least one input or constant
parameter. If a method has a return value, it must have at least one output
parameter.
Table 9 method Element Attributes
Attribute
Type
Description
name
string
help
string
index
string
Type
Description
subject
string
timeout
string
28
Type
Description
handlerType
enume
rationS
handlerType SU
RPC
useCM
string
cmListenerList
string
valueChoices
Type
Description
name
string
help
string
type
enume
ration
fieldName
string
30
Type
Description
pattern
string
Type
Description
value
string
Type
Description
value
string
Constant parameters are not exposed to the TIBCO Hawk Agent or TIBCO Hawk
Display. Constant parameter values are passed to the rvhma method internally.
This type of parameters are used when some fixed constant values need to be
passed to rvhma methods.
Constant parameters are used to fill in constant value fields in the message.
Table 13 constantParameter Element Attributes
Attribute
Type
Description
name
string
help
string
type
enume
ration
fieldName
string
32
SU
Subscription Subject.
Type
Description
name
string
help
string
type
enume
ration
fieldName
string
Type
Description
pattern
string
34
A nested field must be in the form of F1[.F2[...[.FN]]] where F1 - FN are the TIBCO
Rendezvous message field names in each nested level. For example, a message
has a field N E S T E D _ F I E L D , which is another TIBCO Rendezvous message and that
message has a field L 2 . For a parameter corresponding to the value of the field L 3
in N E S T E D _ F I E L D . L 2 , its f i e l d N a m e attribute should be:
<constantParameter
name = "A nested field"
fieldName = "NESTED_FIELD.L2.L3"
type = "I8"
value = "1"
>
</constantParameter>
If a field is a repeating field, the instance number (starting from 1) must also be
specified using the notation of {instance number} appended after the field name. For
example, N E S T E D _ F I E L D . L 2 . L 3 R { 1 } means the field L3R belongs to the first
instance of the repeating field L 3 R of N E S T E D _ F I E L D . L 2 . In the second example,
N E S T E D _ F I E L D . L 2 . L 3 R { 2 } means the field L3R belongs to the second instance of
the repeating field L 3 R of N E S T E D _ F I E L D . L 2 .
<constantParameter
name = "First repeating field L3R in L2"
fieldName = "NESTED_FIELD.L2.L3R{1}"
type = "I16"
value = "2"
>
</constantParameter>
<inputParameter
name = "Second repeating field L3R in L2"
fieldName = "NESTED_FIELD.L2.L3R{2}"
type = "I64"
>
</inputParameter>
Note that the type of "array of TibrvMsg" is not supported by TIBCO Rendezvous
and a f i e l d N a m e such as F 1 . F 2 [ 2 ] . F 3 is not valid. When repeating fields or
array fields appear in the input or constant parameters (for sending), the sequence
numbers or the index numbers must be in order, that is., no skipping is allowed.
36
to:
<!DOCTYPE TIBHAWK_AMI SYSTEM "rvhma.dtd">
On Windows
t i b h a w k r v h m a - - n a m e < servicename> - x m l _ f i l e < filename> - c h e c k _ o n l y
Where, <filename> is the complete path to the configuration XML file and
<servicename> is the internal Windows service name given to this instance of the
adapter.
The <servicename> for the default service installed is T I B H a w k R V H m a .
When the - c h e c k _ o n l y option is used when starting the adapter, it checks the
XML syntax only. Any syntax errors are displayed in the console window where
the command was run. The adapter process stops automatically after checking
completes.
38
H a w k R V M e s s a g i n g A d a p t e r,
Tools,
then open
then click S t a r t .
<file_name>
Where <file_name > is the complete path to the XML configuration file.
H a w k R V M e s s a g i n g A d a p t e r,
Tools,
then open
then click S t o p .
40
<file_name>
Where <file_name > is the complete path to the XML configuration file.
The default configuration files are in the $ H A W K _ R O O T / a d a p t e r s / r v h m a / s a m p l e s
directory.
Using the default s h u t d o w n method from the TIBCO Hawk Display. For a
description of this method, see page 65.
Using the k i l l
< pid>
command.
H a w k R V M e s s a g i n g A d a p t e r,
Account
Tools,
then open
then click S t a r t u p .
and type the new user account
4. Click O K .
5. Click C l o s e to exit the Services dialog, then close the Control Panel window.
You must re-boot the machine for the service configuration changes to take
effect.
42
RVHma is ready...
2000/04/25 17:54:00.664
You can change the level of information logged in the file using the t r a c e L e v e l
attribute in the TIB_HAWKAMI element or the t r a c e L e v e l attribute in the
microagent element. Any values specified at the microagent level override the
TIB_HAWKAMI settings for that microagent. However, it is recommended to use
a single log file per adapter.
You can also modify trace settings by invoking the standard s e t T r a c e L e v e l
TIBCO Hawk method.
| 43
Chapter 4
This chapter explains how to test the adapter by using its methods directly. See
Chapter 5 for examples of using adapter methods in a rulebase.
Topics
Overview, page 44
44
46
Before starting the example on Windows, ensure that the service is not
running by displaying the Services dialog box and verifying that T I B C O
H a w k R V M e s s a g i n g A d a p t e r S t a t u s is not set to S t a r t e d .
Before starting the example on Unix, ensure that the adapter process is not
running.
On Windows:
Select S t a r t > P r o g r a m s > T I B - H a w k S o f t w a r e > H a w k D i s p l a y from the S t a r t
menu, or double-click H a w k D i s p l a y in the TIBCO Hawk program group.
On Unix:
Type s t a r t d i s p l a y at a command prompt.
The TIB/Hawk Display main window displays.
The next section explains how to use the adapter methods to send and receive
TIBCO Rendezvous messages and to shutdown the adapter.
48
The S u b s c r i p t i o n
Results
50
Results
52
Before starting the example on Windows, ensure that the service is not
running by displaying the Services dialog box and verifying that T I B C O
H a w k R V M e s s a g i n g A d a p t e r S t a t u s is not set to S t a r t e d .
Before starting the example on Unix, ensure that the adapter process is not
running.
Before invoking a sample adapter . b a t file, you may need to edit it and its
corresponding XML configuration file for your environment. See page 45 for
details.
To run the sample adapters:
| 53
Chapter 5
Topics
54
DOWN down
Name
field.
Source
field.
dialog displays:
56
Builder
The T h e n field is for one or more actions to take if the test evaluates to true.
For more information, see the TIBCO Hawk Administrators Guide.
2. Click the Edit button next to the I f field.
The T e s t
Builder
dialog displays.
The M i c r o a g e n t s ,
dialog displays.
and R u l e b a s e
58
List For
Agent
16. Click A p p l y
running.
Changes
60
Name
field.
Source
field.
dialog displays:
Interval
The I f field is for the test expression, which you create in the T e s t
dialog.
Builder
The T h e n field is for one or more actions to take if the test evaluates to true.
For more information, see the TIBCO Hawk Administrators Guide.
2. Click the E d i t button next to the I f field.
The T e s t
Builder
dialog displays.
3. In P a r a m e t e r, click T i m e o u t .
4. In O p e r a t o r, click i s T r u e .
The dialog should look like the following:
dialog displays.
Variable>Agent Name.
62
List For
14. Click Apply Changes to save the rulebase on the agent where the adapter is
running.
| 63
Chapter 6
Topics
64
Description
shutdown
getReleaseVersion
getTraceParameters
setTraceParameters
getTraceLevel
setTraceLevel
getMaxThreads
setMaxThreads
tibrvsend
tibrvlisten
tibrvecho
dynamicSubscriber
_onUnsolicitedMsg
shutdown 65
shutdown
Method
SYNC, IMPACT_INFO
Arguments
None.
Returns
None.
Usage Notes
If the adapter process is running, invoking this method stops the adapter
gracefully.
66
Usage Notes
SYNC, IMPACT_ACTION_INFO
None.
Name
Type
Description
Name
String
Version
String
Date
Integer
Major
Integer
Minor
Integer
Update
Integer
getTraceParameters 67
getTraceParameters
Method
Usage Notes
SYNC, IMPACT_ACTION
None.
Name
Type
Description
Directory
String
File Name
String
Integer
Integer
68
SYNC, ACTION_INFO
Arguments
Returns
Usage Notes
Name
Type
Description
Directory
String
File Name
String
Integer
Integer
None.
This method modifies log file parameter values. To keep the current setting for
string parameters, use the string c u r r e n t . For integer parameters, use 0 .
getTraceLevel 69
getTraceLevel
Method
Usage Notes
SYNC, IMPACT_INFO
None.
Name
Type
Description
Information
String
Warning
String
Error
String
Debug
String
AMI
String
RV
String
This method returns the current level of trace information written to the adapter
log file. For information on trace level usage, see the TIBCO Hawk Programmers
Guide.
70
Returns
Usage Notes
SYNC, IMPACT_ACTION_INFO
Name
Type
Description
Information
String
Warning
String
Error
String
Debug
String
AMI
String
RV
String
None.
This method allows you to set the level of trace information written to the adapter
log file. Specifying the string c u r r e n t preserves the current setting. For
information on trace level usage, see the TIBCO Hawk Programmers Guide.
getMaxThreads 71
getMaxThreads
Method
Returns the maximum number of AMI invocation handling threads for the
adapter.
Type
Arguments
Returns
Usage Notes
SYNC, IMPACT_INFO
None.
Name
Type
Description
Maximum Threads
Integer
This method returns the number of method invocations that can run in parallel. If
more methods are simultaneously invoked than the M a x i m u m T h r e a d s value,
extra methods are delayed. This value should be high enough to accommodate
typical usage.
This method is available only if a m a x T h r e a d s value is specified for a microagent
in the adapter XML configuration file.
72
Sets the maximum number of AMI invocation handling threads for this session of
the adapter.
Type
Arguments
Returns
Usage Notes
SYNC, IMPACT_ACTION_INFO
Name
Type
Description
Maximum Threads
Integer
None.
This method sets the number of method invocations that can run in parallel. If
more methods are simultaneously invoked than the M a x i m u m T h r e a d s value,
extra methods are delayed. This value should be high enough to accommodate
typical usage.
This method is available only if a m a x T h r e a d s value is specified for a microagent
in the adapter XML configuration file.
tibrvsend 73
tibrvsend
Method
Returns
SYNC, IMPACT_INFO
Name
Type
Description
Subject
String
Message
String
None.
74
Returns
SYNC, IMPACT_INFO
Name
Type
Description
Subject
String
Name
Type
Description
Subscription
Subject
String
Message Subject
String
MSG_CONTENT
String
dynamicSubscriber 75
dynamicSubscriber
Method
The dynamic subscriber method is similar to tibrvlisten except that message fields
are converted to strings and mapped to separate (up to 20) columns.
Type
SYNC, IMPACT_INFO
Arguments
Returns
Name
Type
Description
Subject
String
Name
Type
Description
Subscription
Subject
String
Message Subject
String
FIELD n *
String
where n = 1 to 20.
76
Returns any unsolicited notifications the adapter sends to the TIBCO Hawk
Agent.
Type
Arguments
Returns
ASYNC, IMPACT_INFO
None.
Name
Type
Description
TYPE
String
Usage Notes
TEXT
String
ID
Integer
INBOX
String
Invoking this method returns the last unsolicited notification message that was
received (if any). Subscribing to the method receives all incoming unsolicited
messages.
| 77
Appendix A
This appendix describes the pattern matching syntax used for parsing and
converting method input and output parameters. When a pattern is specified in
the adapter configuration file, the adapter converts input text data to the specified
format.
Topics
78
Patterns are applied using argument placeholders, which have the following
form:
{
The curly brackets and number argument are required. The number argument can be
from 0 to 9.
The type argument is optional, and indicates the argument data type. It can be one
of t i m e , d a t e , n u m b e r, or c h o i c e .
The format argument is also optional, and is a string that describes the argument
format. Possible format values depend on the specified type. For more
information on possible values for format, see the Java API documentation for the
C h o i c e F o r m a t , D a t e F o r m a t and N u m b e r F o r m a t classes.
You specify the argument placeholder in the p a t t e r n attribute of the
i n p u t P a r a m e t e r o r o u t p u t P a r a m e t e r element. Only the first argument
placeholder in the pattern is used and the others are ignored.
Table 15 Examples of using Argument{0} in Patterns
Text
Pattern
256 KB
{0,number}KB
256
xyz (5%)
{1}({0,number}%)
Host:smiles-no
response
{1):{0}-{2}
smiles
| 79
Appendix B
This appendix describes the TIBCO Hawk Service Wrapper for the Windows
environment.
Topics
80
Description
servicename
-displayname
displayname
-manual
Windows Wrapper 81
Description
-auto
-account
accountname
password
-password
-params
(p1 p2 ...pN)
-jvm11opts
(o1 o2 ...oN)
-jvmopts
(o1 o2 ...oN)
82
Running Under
JVM 1.2 or 1.3
None
-jvm11opts
-jvmopts
only
only
-jvm11opts
and
-jvm11opts
used
used
-jvm11opts
used
-jvmopts
used
-jvmopts
used
-jvmopts
Java Classpath
The t i b h a w k r v h m a . e x e program automatically constructs the Java classpath for
the TIBCO Hawk Rendezvous Messaging Adapter Windows service. Assuming
that the t i b h a w k r v h m a . e x e program is located in directory c : \ t i b c o \ h a w k \ b i n ,
the constructed classpath will consist of the following in the specified order:
Windows Wrapper 83
There are additional classpath related properties that can be specified for the Java
2 platform. See the Java documentation for details. The t i b h a w k r v h m a . e x e
program passes the classpath described above, to the Java 2 virtual machine using
the - D j a v a . c l a s s . p a t h property. The user should not specify this property
directly but use the -c p and -c l a s s p a t h options to alter the classpath.
Since the detailed command for installing the adapter as a Windows service is
quite complicated. It is suggested you use the sample batch file such as
r v h m a S a m p l e 1 . b a t provided in the samples directory as a template to write
your own to start your custom adapters.
Where <servicename> is the internal service name used when the service is installed,
and <filename> is the complete pathname of the XML configuration file.
The command for specifying the -- h e l p option to display the command line
syntax for the adapter is:
tibhawkrvhma.exe --help/--h/--? <options>
The Windows service for the adapter with the specified <servicename> must be
installed before an adapter can be executed as a Windows console application.
84
Tools,
then open
| 85
Index
adapter
starting 38
stopping 39
AMI Protocol
description 6
Architecture 3
array field 35
inputParameter attributes
fieldName 29
help 29
name 29
pattern 30
type 29
Installation steps
UNIX 14
Windows NT 10
installing a custom adapter 12
C
changing the service log on account on NT 41
configuration file
changing defaults 45
validating 36
configuring the adapter 20
constantParameter attributes
fieldName 31
help 31
name 31
type 31
customer support xiv
F
field
array 35
nested 34
repeating 34
functional components 5
L
legalValueChoices attribute
value 31
M
Method attributes
cmListenerList 28
handlerType 28
help 26
index 26
subject 27
timeout 27
useCM 28
86
|
methods
_onUnsolicitedMsg 76
dynamicSubscriber 75
getMaxThreads 71, 71
getReleaseVersion 66
getTraceLevel 69
getTraceParameters 67
setMaxThreads 72
setTraceLevel 70
setTraceParameters 68
shutdown 65
tibrvlisten 74
tibrvsend 73
Microagent attributes
cmLedger 25
cmName 25
displayName 24
help 24
maxThreads 25
name 24, 26
rvDaemon 25
rvNetwork 25
rvService 25
traceFile 26
traceFileMaxNumber 26
traceFileMaxSize 26
traceLevel 26
N
nested field 34
O
outputParameter attributes
fieldName 32
help 32
name 32
pattern 33
type 32
R
repeating field 34
S
shutdown 48
starting the adapter 38
UNIX 40
Windows NT 38
starting TIBCO Hawk Display 47
stopping the adapter 39
UNIX 40
Windows NT 39
support, contacting xiv
T
technical support xiv
TIBCO Hawk Display
starting 47
TIBCO_HOME xii
| 87
TIBHAWK AMI attribute
ami_rvd_daemon 22
ami_rvd_network 22
ami_rvd_service 22
cmLedger 22
cmName 22
dtd_type 21
dtd_version 21
ftActiveGoal 23
ftActiveInterval 23
ftGroupName 23
ftHeartbeatInterval 23
ftPrepInterval 23
ftWeight 23
rvAdvisoryForward 23
rvAdvisoryTraceLevel 23
rvDaemon 22
rvNetwork 22
rvService 22
traceFile 24
traceFileMaxNumber 24
traceFileMaxSize 24
traceLevel 24
xml_file_version 21
tibrvlisten 48
tibrvsend 48
U
Uninstalling the adapter
UNIX 17
Windows NT 11
V
validating configuration file 36
valueChoices attribute
value 30