ADADB UserGuide
ADADB UserGuide
ActiveDatabase
User’s Guide
Software Release 5.1.0
November 2003
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
THIS MANUAL). 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.
TIB, TIBCO, Information Bus, The Power of Now, TIBCO ActiveEnterprise, TIBCO Adapter, TIBCO
Administrator, TIBCO Designer, TIBCO Hawk, TIBCO IntegrationManager, TIBCO Rendezvous,
and TIBCO Runtime Agent are either registered trademarks or trademarks of TIBCO Software Inc.
in the United States and/or other countries.
EJB, J2EE, JMS 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. Please see the readme.txt 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.
PORTIONS OF THIS SOFTWARE ARE COPYRIGHTED BY DATADIRECT TECHNOLOGIES,
1991-2002.
Copyright © 1999-2003 TIBCO Software Inc. ALL RIGHTS RESERVED.
TIBCO Software Inc. Confidential Information
| iii
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
TIBCO Adapter for ActiveDatabase Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Other TIBCO Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
How to Contact TIBCO Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Adapter Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Publication and Subscription Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Request-Response Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Message Transports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
TIBCO Rendezvous Transport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
TIBCO Enterprise for JMS Transport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Adapter Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Run-time Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
TIBCO Runtime Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Polling or Alerter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Referencing External Schemas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Exception Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Loop Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Master-Master Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Multi-file Format Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
DAT File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Supported SQL Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Publication Service Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Publish by Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Publish by Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Update Feature for Parent-Child Publication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Changing a Publication Subject Without Using TIBCO Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 5 Deploying and Starting the Adapter Using TIBCO Administrator Enterprise Edition .
97
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Create an EAR File in TIBCO Designer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Deploy the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Start or Stop the Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Monitor the Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Chapter 6 Deploying and Starting the Adapter Using TIBCO Administrator Repository Edition.
105
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Export the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Create a Properties File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Set Properties in Properties File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Assign Security Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Start or Stop the Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Figures
Tables
Table 1 Values to Use for TIBCO Rendezvous and JMS Transport Types . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 2 Predefined Global Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Table 3 JDBC Drivers and URLs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Table 4 TIBCO Administrator Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Table 5 Run-time Adapter Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Table 6 Required Run-Time Adapter Properties File Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Table 7 Additional Run-Time Adapter Properties File Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Table 8 Optional parameters for server-based locator string (TIBCO Rendezvous). . . . . . . . . . . . . . . . . 127
Table 9 Required fields for server-based locator string (HTTP or HTTPS). . . . . . . . . . . . . . . . . . . . . . . . 128
Table 10 Optional parameters for server-based locator strings (HTTP or HTTPS) . . . . . . . . . . . . . . . . . . 129
Table 11 Optional parameters for local repository locator string. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Table 12 Alerter Command Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Table 13 REQUEST Schema Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Table 14 REPLY Schema Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Table 15 Publishing Table Additional Columns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Table 16 Mapping to Database Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Table 17 Wire Format Parameters and Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Table 18 adbPreCommit Parameter Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Table 19 Compilers for Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Table 20 IANAAppCodePage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Table 21 TIBCO ActiveDatabase Adapter and Oracle NLS_Lang Values . . . . . . . . . . . . . . . . . . . . . . . . . 229
Table 22 Standard Microagent Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Table 23 Custom Microagent Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Table 24 Custom Microagent Methods with adb.perfMon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Table 25 Trace Message Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Preface
Topics
Related Documentation
For comments or problems with this manual or the software it addresses, please
contact TIBCO Support Services as follows.
• For an overview of TIBCO Support Services, and information about getting
started with TIBCO Product Support, visit this site:
http://www.tibco.com/services/support/default.jsp
• If you already have a valid maintenance or support contract, visit this site:
http://support.tibco.com
Entry to this site requires a username and password. If you do not have a
username, you can request one.
Chapter 1 Introduction
Topics
• Overview, page 2
• Adapter Services, page 4
• Message Transports, page 6
• Adapter Architecture, page 8
• Supported SQL Operations, page 14
• Publication Service Considerations, page 15
• Checking for Duplicate Configurations, page 17
• Message Logging Feature, page 18
• Timely Processing of Data, page 19
Overview
TIBCO Adapter for ActiveDatabase software (the adapter) allows data changes in
a database to be sent as they occur to other databases and applications. It extends
publish-subscribe and request-response technology to databases, making
multiple levels of delivery services available to applications that need access to
these databases. ODBC and JDBC compliant databases such as Oracle, Sybase,
and Microsoft SQL Server are supported. While the adapter does not run on
OS/390 and AS/400 systems, it can remotely connect to a DB2 database running
on these systems.
TIBCO Adapter for ActiveDatabase is written using the TIBCO Adapter SDK
software, which allows the adapter to interoperate with other TIBCO products.
The adapter can communicate with any application that is configured for the
TIBCO environment.
Capabilities
The following capabilities are described in detail in this manual.
• Automatically publish data when rows in pre-specified database tables are
inserted, updated or deleted:
— Publish data by creating a copy (by value). See Publish by Value on page 15.
— Publish by reference (publish data directly from the source database table
without first copying the data from the source table to a publishing table).
See Publish by Reference on page 15.
— Publish on parameterized subjects, which allows a subject to be created
from the contents of one or more table columns. See Parameterized Subject
Names on page 185.
— Preregister certified subscribers with a certified publisher. See
Preregistering a Certified Subscriber on page 186.
— Update both parent and child tables within a publication. Both the parent
row and all related child rows will be published if the user has set up to
publish child data. See Adding Child Tables on page 73.
• Automatically subscribe to data and insert, update or delete the data in
pre-specified tables in a database:
— Subscribe using wildcard subject names. See Subject Names on page 184
and Preregistering a Certified Subscriber on page 186.
— Perform batch commits based on message count or time out value. See
Adapter Services Tab on page 52.
Adapter Services
Database Database
Application 1 Application 2
TIBCO Messaging
Other TIBCO
Applications
Request-Response Service
The request-response feature in TIBCO Adapter for ActiveDatabase allows an
application to submit one or more SQL statements, stored procedures, or both for
the adapter to execute. After execution, the adapter returns one or more result sets
and a result code. The request and responses are formulated using nested
self-describing messages. This data flow is illustrated in the figure below.
TIBCO TIBCO
Application 1 Application 2
TIBCO Messaging
Adapter
Database
The adapter can also be configured to manage requests using load balancing
among a set of adapters that participate in the same named queue. Additionally,
the adapter has been designed to allow multiple threads to process application
requests.
For more information, see Chapter 8, Using the Request-Response Service, on
page 143.
Message Transports
Two message transports are available: TIBCO Rendezvous and TIBCO Enterprise
for JMS. These transports are described below.
Adapter Architecture
Database
ODBC JDBC
TIBCO Messaging
Application 1 Application 2
Run-time Adapter
A run-time adapter service acts as a bi-directional bridge between your database
and the TIBCO environment. A publisher adapter service monitors your
database, extracting data from relevant database tables and sending it on an
appropriate subject using the configured quality of service, reliable or certified. A
subscriber adapter service listens for messages sent on configured subjects and
inserts, deletes or updates rows in its associated database tables with the
information.
Each adapter should have a unique name within a project. For more information,
see Configuration Tab on page 44.
By default, an adapter has both publisher and subscriber roles. A publisher role is
defined by a project, when the Number of Publication Service Threads value is
1. A configuration has a subscriber role when the Number of Subscription
Service Threads value is 1. For more information on changing these values, see
Adapter Services Tab on page 52.
Adapter services using TIBCO Rendezvous transport can use the TIBCO
Rendezvous certified messaging service. Message parameters are stored in the
project and can be modified for your environment. For an example, see Changing
the Location of the Ledger File on page 188. Adapters using JMS can use the
durable messaging service.
Polling or Alerter
An adapter publication service can use periodic polling or an alerter process to
monitor changes to a database table.
• The default method is polling. The adapter polls (checks) the publishing
tables periodically for any new rows to be published. This method is most
efficient when the publishing tables change frequently and a limited number
of database operations is preferred.
• In the case where the publishing tables change infrequently, polling may
result in many unnecessary database accesses. For this situation, a set of
alerter executables is provided for a database, to asynchronously alert the
adapter of changes in the database. This removes the need for the adapter to
poll its publishing table for existence of new rows. It is recommended to use
the alerter only when database changes are infrequent. When the adapter
receives an alert, it publishes the new data. (Publishing on subjects is
introduced in Subject Names on page 184 and explained fully in TIBCO
Rendezvous Concepts.)
The alerter is not available on all databases and platforms. See Chapter 7 on
page 133 for details.
Exception Table
You can designate an exception table for a subscriber. If a subscriber adapter
cannot write data to its destination table, it will write the data to the exception
table.
To write to an exception table, an adapter must be started with the
adb.useExceptTable option set to on in the supplied properties file and an
exception table must have been specified when using the TIBCO Designer to add
a subscription. If an error occurs when inserting data into the destination table,
the adapter attempts to insert the data into the exception table.
• If the insertion into the exception table is successful and the RVCM quality of
service is specified for the subscription, the transaction commits and
confirmation for the message is sent back. In the publishing table, the value of
the delivery status column is C, since the message was processed. If you are
using a durable JMS subscriber, a JMS confirmation will be sent back.
• If the insertion into the exception table fails, an error message displays, a
rollback occurs and a TIBCO Hawk alert is published. The adapter will then
terminate. The user is advised to fix the problem with the message or the table
and then to restart the adapter. The message will be delivered again after the
adapter starts. (If the adapter did not terminate, after the next message was
inserted successfully, its confirmation would also implicitly confirm the failed
message.)
You can identify the operation that failed by checking the ADB_OPCODE column
of the publishing table. The ADB_ERROR_TEXT column contains error
information. For details, see Exception Table on page 177.
Loop Detection
If a source table is used both as the source and destination table on the same
subject, the loop detection feature should be enabled. The feature prevents the
same changes from being published repeatedly.
If the loop detection feature is enabled, an additional column, ADB_SOURCE, is
added to the source table. When an adapter receives a message, it inserts or
updates the source table and enters a T in the ADB_SOURCE column to denote
that this row was inserted or updated as a result of a message, rather than from
user intervention.
Triggers created by the ActiveDatabase Adapter Configuration palette are defined
to not copy rows with T in the ADB_SOURCE column into the publishing table,
which effectively means that the row will not be published. If you must update a
row that was received (that is, has a T in the ADB_SOURCE column) and want the
updated row propagated, you must also change the ADB_SOURCE column to
NULL. This causes the trigger to pick up the row and send it out.
Master-Master Replication
You can use the loop detection feature to implement a simple master-master
replication scheme. Master-master replication allows multiple sites, acting as
peers, to copy and maintain groups of replicated objects.
In the multi-file format, these references are replaced by URIs of the following
form:
ProjectRoot/multi-file_project_name/#type.name
For example, the first reference above would map to the following URI in a
multi-file project:
ProjectRoot/Adapters/adb/test/instance1/publisher1
The adapter supports the following SQL operations for publishing and
subscribing:
• INSERT
• UPDATE
• DELETE
• UPDATE/INSERT (update if row exists, otherwise insert)
Whenever a supported SQL statement is executed against a table monitored by a
publisher adapter, the adapter instance sends a message to its subscribers, which
update their destination tables.
Publish by Value
When a user modifies a row in a source table that has been set up for publication,
the data in the modified row is copied into a publishing table by a stored
procedure created by the adapter during configuration. The adapter then selects
the data from the publishing table, packs it into a message, and sends it.
An advantage of publish by value is its speed. However, it does not support some
data types, such as Oracle LONG and LONG RAW. Publishing these data types
by value from a top-level table is unsupported due to database trigger limitations.
Publish by Reference
The publish by reference feature allows you to publish data directly from the
source table without first copying the data to a publishing table. If a source table
is set up to publish by reference, the publishing table does not contain a copy of
the source table data. Instead, the adapter selects the data for publishing directly
from the source table itself.
For example, to publish from ORDER_TABLE with a key field ORDER_ID, the
publishing table is created with the necessary adapter fields and the ORDER_ID
field. When a row in ORDER_TABLE is modified, the trigger fires, populating
adapter fields and copying the ORDER_ID value to the publishing table. When the
adapter polls the publishing table, it detects the new row and selects from the
ORDER_TABLE using the ORDER_ID value found in the publishing table. Then the
message is published.
The advantage of publishing by reference is that the data to be published is stored
just once. Also, this method supports data types such as Oracle LONG and LONG
RAW.
The disadvantage of publish by reference is that after a row in the source table is
modified, a small amount of time passes before the adapter selects the row.
During this short interval, the row could be modified again. If this happens, the
adapter will get only the second set of modifications when it selects the row.
However, this time lapse can be minimized by using the alerter.
Any changes to the child tables without a change in the parent table will not be
processed. The adapter monitors only the parent table for publishing. You can
define a trigger on the child table that will update the parent row whenever a
change to the child table occurs.
While multiple adapter instances can run concurrently on the same machine to
split the load of publications and subscriptions on the database, each
configuration must have a unique name. During the configuration initialization
cycle, a new adapter instance broadcasts a message with its name. If any running
adapter has this name, it will reply to the broadcast message, causing the new
adapter to abort its initialization phase and stop.
If there is running a configuration of the adapter with the same name, that
configuration will respond to the broadcast message and the new configuration
will not start.
To prevent same-named configurations starting on sites that have multiple TIBCO
Rendezvous networks, you must allow the _ADB.DUPDECT.adapter_instance_name
subject to pass through each network by configuring the rvrd daemon for each
subnet. See TIBCO Rendezvous Administration for more information about using
multiple TIBCO Rendezvous networks.
You can configure an adapter instance to use the following transports and
subscribe to messages in the wire formats shown below.
• TIBCO Rendezvous transport uses three wire formats:
— TIBCO ActiveEnterprise wire format
— TIBCO Rendezvous wire format
— XML wire format
• JMS transport uses the XML wire format to communicate with the TIBCO
Enterprise for JMS Server.
• Opaque transport uses the TIBCO Rendezvous wire format.
Opaque Format
When the adapter receives a message in opaque format, it does not parse the
message. Instead, the adapter logs the message by inserting it into a table created
by TIBCO Designer. This table has two columns: a RAW column named LOG for
storing the message, and a DATE column named TIMESTAMP which contains the
date and time the message was inserted.
When using the TIBCO Rendezvous transport, messages can be retrieved by a
database program that casts the message back into its original (uninterpreted)
format. For an example of a program that selects the uninterpreted message and
converts it from binary format to a TIBCO Rendezvous format, see the
logtest.cpp file in your install-path\demo\logtest directory.
This chapter helps you get familiar with the adapter by running you through a
basic exercise. Work through the exercise to get a hands-on understanding on
how the adapter works.
Topics
• Overview, page 22
• Create the Database Tables, page 25
• Configure the Properties File, page 26
• Start the Adapters, page 28
• Change the Table Values and Receive Notification, page 29
• Exit the Query Tool and Adapters, page 31
• Clean Up, page 32
Overview
In this exercise, you create tables in your database and configure a publisher
adapter and a subscriber adapter. Then you modify a table and observe how the
publisher adapter and subscriber adapter handle the change and update the
subscription table.
Before Starting
Before performing this exercise, make sure that TIBCO Adapter for
ActiveDatabase is installed according to the procedures in the TIBCO Adapter for
ActiveDatabase Installation Guide. These procedures include creating a database
account for the adapter and setting the ODBC data source, among other things.
You should be familiar with using TIBCO Designer to open and close projects and
drag and drop resources; see the TIBCO Designer User’s Guide for more
information. That document also describes the multi-file format used by TIBCO
Designer, and converting to and from the .dat file format used by the run-time
agent. The TIBCO Designer User’s Guide is available from TIBCO Designer by
clicking the Help>Designer Help menu choice.
Tables
The tables are created by running a script specific to your database vendor. The
script creates the following tables, all with a common set of columns:
• Source table to which you will add new data.
• Publishing table to which the new data from the source table is copied using
the trigger set on the source table. This table has additional columns (prefixed
by ADB_) that are used by the adapter.
• Destination table that TIBCO Adapter for ActiveDatabase will update with the
new data.
• Exception table to which TIBCO Adapter for ActiveDatabase will write any
errors that occur during subscription.
Actions
When you add data to the source table, the following occurs:
1. The insert action fires a trigger and the inserted row is copied to the
publishing table.
2. The publisher adapter polls the publishing table to check if any new rows
have been inserted. Newly inserted rows are fetched using ODBC, packed
into a message, and published.
3. The subscriber adapter listens for messages. When a message arrives, the
subscriber adapter inserts it into the destination table using ODBC.
The following diagram illustrates the activity.
Publishing Destination
Table Table
Insert
Trigger Exception
Table
Source
Table
Publisher Subscriber
Adapter Adapter
TIBCO Messaging
Tasks
This exercise consists of the following tasks:
• Create the Database Tables
• Configure the Properties File
• Start the Adapters
Exercise
This exercise uses the Oracle database. You can use the TIBCO Rendezvous or
JMS transport. When performing this exercise, use the appropriate transport
values for your configuration (as listed in Table 1) and follow the instructions that
pertain to your particular database vendor.
You will need the following information, specific to your user environment:
• Database user ID
• Database password
• Database service
The values you will enter for the tables and the publisher and subscriber adapter
instances are different, depending on which transport type you are using. (The
kind of database you are using does not affect these names.)
Table 1 Values to Use for TIBCO Rendezvous and JMS Transport Types
C:\TIBCO\adapter\adadb\5.1\demo\demo1>sqlplus joanne/joanne@ora817
@demo1_ora.sql
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
JServer Release 8.1.7.0.0 - Production
Table created.
Table created.
Table created.
Index created.
Index created.
Index created.
Sequence created.
Trigger created.
Table created.
Table created.
Table created.
Table created.
Index created.
Index created.
Sequence created.
Trigger created.
Table created.
Commit complete.
SQL>
After creating the database tables, configure the adapter’s properties file.
1. In the demo1 subdirectory, locate the correct publisher adapter properties file
for the transport type you are using. Refer to Table 1 on page 24.
2. Open the publisher adapter file and set the following values as appropriate
for your environment.
Property Value
adb.user userId Remove the comment-out character (#) from this line.
Use the database account name used by the adapter
instance. This is the same username entered during
TIBCO Adapter for ActiveDatabase installation when
creating a database account for the adapter.
adb.password pswd Remove the comment-out character (#) from this line.
Use the database account password used by the adapter
instance. This is the same password entered during
TIBCO Adapter for ActiveDatabase installation when
creating a database account for the adapter.
This password is not saved in the project. The global
variable %%adb.password%% is saved instead.
adb.dsn dataSource Remove the comment-out character (#) from this line.
Use the name of the ODBC system data source for the
adapter. The data source is configured as part of the
TIBCO Adapter for ActiveDatabase post-installation
procedure. See the TIBCO Adapter for ActiveDatabase
Installation Guide for details.
For example:
C:\TIBCO\adapter\adadb\5.1\demo\demo1>write rvpub.tra
#
# Sample ADB properties file
# Optional properties file you can use in place of command line
parameters
# Usage: adbagent --propFile propFilename
.
.
.
You can use TIBCO Rendezvous or TIBCO Enterprise for JMS as the message
transport.
1. If you are using TIBCO Rendezvous transport, skip this step.
If you are using JMS transport, open a command window and change
directory to the TIBCO Enterprise for JMS bin directory and start the JMS
server. For example:
cd c:\tibco\JMS\bin
> tibjmsd
2. Open a new command window and change directory to the adapter bin
directory. For example:
> cd c:\tibco\adapter\adadb\5.1\bin
2. Invoke the query tool using the environment-specific user ID, password, and
database service specified in Task .
> sqlplus userid/pswd@dbService
3. Insert three values into the source table, then commit the change.
If using TIBCO Rendezvous:
SQL> insert into ORDER_TABLE values(111,'Oak Table',499.95);
SQL> commit;
SQL> commit;
You will see the message being sent in the publisher adapter window and,
after a short delay, received in the subscriber adapter window.
4. Verify that the row in the source table has been inserted into the destination
table.
If using TIBCO Rendezvous:
SQL> select * from SUB_ORDER;
The following example result confirms that the data has been inserted:
ORDER_ID
----------
ORDER_DESCRIPTION
---------------------------------------------------
ORDER_PRICE
-----------
111
Oak Table
499.95
The following example result confirms that the data has been inserted:
ITEM_ID
----------
ITEM_DESCRIPTION
---------------------------------------------------
ITEM_PRICE
-----------
111
Oak Table
499.95
5. Insert additional rows of data, if you wish. If you do, be aware that the first
column (containing the value 111 in the example) is a primary key and must
contain a value that is unique within the table.
After running the example, exit the query tool and adapters.
1. Exit the SQL query tool. For example:
SQL> exit
Note that the tibrvsend program is typically not used to terminate the
adapter. Instead, a JMS program typically sends a JMS message to the JMS
termination destination configured for the adapter.
Clean Up
This cleanup script removes the example tables that were created by the
demo1_cleanup_databasevendor.sql script.
Topics
• Overview, page 34
• Configuration Tab, page 44
• Design-time Connection Tab, page 46
• Run-time Connection Tab, page 50
• Adapter Services Tab, page 52
• General Tab, page 56
• Logging Tab, page 58
• Startup Tab, page 62
• Monitoring Tab, page 63
Overview
The adapter instance tabs in TIBCO Designer allow you to create, design, and run
an adapter. Adding services to an adapter is described in Chapter 4, Adapter
Service Options.
Please read the following sections before starting to configure an adapter.
• Configuration Tasks, page 34
• Saving the Project, page 35
• Testing the Adapter, page 36
• Notes on Configuring an Adapter, page 36
• Configuration Recommendations, page 37
• Changing an Existing Configuration, page 37
The adapter instance tabs are described in the following sections.
• Configuration Tab, page 44
• Design-time Connection Tab, page 46
• Run-time Connection Tab, page 50
• Startup Tab, page 62
• Monitoring Tab, page 63
• Logging Tab, page 58
• General Tab, page 56
• Adapter Services Tab, page 52
Configuration Tasks
Use the following sequence to create and configure an adapter service.
1. Start TIBCO Designer and open a multi-file project. See the TIBCO Designer
User’s Guide for details.
2. Drag the ActiveDatabase Adapter Configuration icon from the palettes
panel to the design panel. This creates an adapter instance named, by default,
ActiveDatabaseAdapterConfiguration.
3. Define the adapter instance by assigning a new name. See Configuration Tab
on page 44.
4. Define and test the design-time connection options for the instance. See
Design-time Connection Tab on page 46.
5. Either now or when the instance is ready to deploy, define and test the
run-time connection options for the instance. See Run-time Connection Tab on
page 50.
6. As necessary, modify the following default values for the instance:
— Default startup state and session, metadata search URL: see Startup Tab on
page 62
— Standard, class, and default MicroAgents: see Monitoring Tab on page 63
— Logging options: see Logging Tab on page 58
— Termination subject, encoding, and debugging options: see General Tab on
page 56
— Threads, polling, publishing child data, bulk insert size, TIBCO
Rendezvous queue size, exception table: see Adapter Services Tab on
page 52
7. Add one or more services to the adapter instance by dragging a service icon
from the palettes panel and dropping it in the design panel: see Chapter 4,
Adapter Service Options.
8. Under the service’s Configuration tab, set the combination of options for each
service. This is required.
9. As necessary, define tables, mappings, message and reply subjects, endpoints,
and other service options.
10. Save the project as a server repository project.
After configuring the adapter, create the run-time adapter property file and add
the project name and adapter instance name. See Deploying and Starting the
Adapter Using TIBCO Administrator Repository Edition on page 105 for details.
Also define and test the run-time connection options for the instance if you did
not do it earlier. See Run-time Connection Tab on page 50.
• If an adapter instance cannot access the database at startup, the adapter will
not start. If the connection fails after startup, you can configure the adapter to
attempt automatic reconnections (see the Run-time Connection Tab on
page 50). You can also build a TIBCO Hawk rule to restart the adapter
instance after the database is restarted.
• An adapter instance can be stopped in several ways. See Start or Stop the
Adapter on page 111.
• An adapter instance logs error, warning, debug and information messages to
the console window by default. Some of the output can be directed to a log file
that can be located anywhere on your file system.
• Do not use ADB_ to prefix columns in the database. The prefix is reserved for
this product.
Configuration Recommendations
The following recommendations and limitations apply when using TIBCO
Adapter for ActiveDatabase:
• The wire format for both the publishing and destination tables must be the
same, otherwise an error will occur.
• Publisher and subscriber information should be defined in the same project
for all cases. When using parent-child tables or the XML wire format, define
the publisher and subscriber in the same repository.
• The following limitations apply to TIBCO Rendezvous transport type
parameterized subject names:
— Do not insert the * or > character as an attribute value (varchar, char) in a
column that is part of a parameterized subject.
— Do not insert data of Float type as an attribute value in a column that is part
of a parameterized subject.
— Do not use Date type columns as part of a parameterized subject. Dates
generally contain characters such as dashes and spaces that do not work
well as part of a subject.
• Locally define the value for a variable for a specific project. The local value
takes precedence over any global value.
• Specify the value for a variable in a properties file. This overrides the project
repository and values set in code, but not variables set on the command line.
• Enforce the pre-defined variables listed in Predefined Global Variables on
page 41.
Variables can be used anywhere in the configuration and will be replaced by
the locally-defined adapter instance.
Variable Specification
The adapter can specify variables:
• In the project during configuration using TIBCO Designer.
• In a properties file.
• In TIBCO Administrator Enterprise Edition when deploying the project.
The values in the properties file or Enterprise Edition take precedence over the
values set in the project through TIBCO Designer.
The project panel displays all currently defined global variables. You have
these choices for modifying global variables:
— To assign or change a variable value, triple-click the variable. The variable
expands so you can change either the variable name or the variable value.
Press Enter when done.
— To add a new global variable group, click the group icon (on the left below
the project panel). Specify the name of the group, then press Enter.
— To add a global variable to the list, click the abc icon below the project
panel. A new global variable item is added to the bottom of the list. Type
the variable name and, optionally, the value. Press Enter when done.
— To add a global variable to a group, select the desired group icon and click
the abc icon below the project panel.
The global variable is now displayed in the global variables list.
2. When you want to use the global variable in the fields of a resource, enter the
variable name surrounded by %% on both sides.
When the project is deployed and the configured components are run, all
occurrences of the global variable name are replaced with the global variable
value (unless it was overridden in a way that had higher precedence). For
example, RvServiceTest would be replaced with 7800.
Variable Description
Deployment Defaults to the TIBCO Designer project name. This value can be any string
value. This global variable is used by the system to partially define the subject
name defined for a service.
DirLedger Specifies the path name of the TIBCO Rendezvous certified messaging ledger
file. The default is the root installation directory.
DirTrace Specifies the path name for log file used by the adapter. The default is the root
installation directory.
Domain The default value for file-based local projects is Domain. The value for
server-based projects is the domain to which the project was saved.
JmsProviderUrl Tells applications where the JMS daemon is located. Setting this value mostly
makes sense in early stages of a project, when only one JMS daemon is used.
RvNetwork TIBCO Rendezvous network. This variable need only be set on computers with
more than one network interface. If specified, the TIBCO Rendezvous daemon
uses that network for all outbound messages.
In most cases, you can leave the default.
RvaHost Computer on which the TIBCO Rendezvous agent runs. This variable is only
relevant if you are using the TIBCO Rendezvous Agent (rva) instead of the
TIBCO Rendezvous daemon, and if you have configured a non-default setup.
See TIBCO Rendezvous Administration for details about specifying the rva
parameters.
RvaPort TCP port where the TIBCO Rendezvous agent (rva) listens for client connection
requests. See TIBCO Rendezvous Administration for details about specifying the
rva parameters. Defaults to 7501.
TIBHawkDaemon TIBCO Rendezvous daemon used in the TIBCO Hawk session. Specifies which
Hawk daemon handles communication for the session. A local daemon is
specified by the communications type (always tcp) and a socket number. The
default configuration uses the local daemon with the TCP socket number 7474.
Specify a remote daemon by inserting its host name or IP address between the
tcp entry and the port number of the daemon parameter, such as
tcp:remote_computer:7800.
See the TIBCO Hawk Installation and Configuration manual for details about this
parameter.
TIBHawkNetwork TIBCO Rendezvous network used by the TIBCO Hawk session. Specifies which
network to use for outbound session communications when a computer is
connected to more than one network, and also specifies the multicast groups to
use for communication.
See the TIBCO Hawk Installation and Configuration manual for details about this
parameter.
Configuration Tab
You must define the options on this tab before other options can be configured.
Click Apply to apply the changes before leaving this dialog.
Instance Name
Use the default name or replace it with a name of your choice.
• An instance name must use alphanumeric characters. An underscore (_)
character can be used. The entire instance name must be less than 80
characters. The space character cannot be used in an instance name.
• An instance name cannot use global variables.
• An instance name must be unique with respect to other adapter instances for
the same adapter in the project. The same instance name can be used to name
an adapter instance for a different adapter in the same project. For example, a
TIBCO Adapter for ActiveDatabase adapter instance named TEST and a
TIBCO Adapter for Siebel adapter instance named TEST can coexist in the
same project.
• Each instance name must be unique per adapter within a project even if each
instance is defined in a different folder. That is, configuring same-named
adapter instances in different folders will not make their names unique.
When you create an adapter instance, the palette automatically creates several
resources for it. The names of these resources derive from the name of the instance
they belong to. Changing the adapter instance name results in an automatic
regeneration of the resources names. If you manually modify any resource name,
that particular name will not be automatically regenerated next time your rename
the adapter instance.
Description
(Optional) Provide additional information about the adapter instance.
Version
The version string indicates the TIBCO ActiveEnterprise (AE) configuration
format in which the adapter instance is saved. An adapter instance can be saved
in AE 4.0, AE 5.0 or AE 5.1 format.
When a new adapter instance is created in TIBCO Designer 5.x, the version string
is set to AE Version 5.1. When a 4.x adapter instance is opened in Designer 5.x,
the Version field is set to AE Version 4.0.
Message Filter
Specify a message filter, if you have configured a message filter resource for use
with the adapter. The plugin allows you to manipulate incoming and outgoing
data before sending it on the network or handing it to the target application.
Plugins can be written using the TIBCO Adapter SDK. See the TIBCO Adapter
SDK Programmer’s Guide for information about writing a message filter.
Vendor
Select the database vendor to which the adapter connects. This populates the
JDBC Driver and JDBC URL fields in the Design-time Connection Tab with the
appropriate data.
You must define these JDBC information and database account options before
you can design the adapter instance. I
After completing these fields, click Apply, then click Test Connection to establish
a connection to the database. When the connection is successful message
appears, click OK. You can now begin design-time configuration of the adapter.
Many of the following fields can use global variables. Click the Global
Variables tab in the project panel to add or modify a global variable.
Instead of manually entering the following driver and URL values, you can
populate these fields using a connection template or previously-stored connection
parameters. For more information, see the text following this table.
Username
Specify the database user that the design-time adapter uses to connect to the
database.
Password
Specify the password for the database user.
Remember Password
If this field is checked, the password is obfuscated and saved in the project file.
The next time you open this project, the Password field displays the masked
password and the adapter will connect to the database without the user needing
to know or enter the password.
If this field is not checked, the password must be entered here each time the
project is opened. The password is saved in the project file as the global variable
%%adb.password%%.
The fields on the Configuration and Connection tabs are populated with the
values stored in the parameter set.
These settings must be configured before you start the run-time adapter.
After completing these fields, click Apply, then click Test Connection to establish
a connection to the database. When the connection is successful message
appears, click OK. The run-time adapter is now configured.
ODBC DSN
The name of an ODBC system data source for the database where the source or
destination database table resides. The adapter uses this data source to send and
receive information. If not specified, the data source name must be given in the
adapter’s properties file or on the command line.
Username
This is the database user that the run-time adapter uses to connect to the database.
This field is automatically populated when you select a template as described in
Using Connection Templates on page 48. It cannot be changed here.
Password
This is the password for the database user. This field is automatically populated
when you select a template as described in Using Connection Templates on
page 48. It cannot be changed here.
Test Connection
This option is not enabled.
You are not required to change any settings in this tab. These settings affect all
publishers, subscribers, and request-response services defined for the adapter,
unless overridden by the individual service configurations as described in
Chapter 4, Adapter Service Options.
Click Apply to apply the changes before leaving this tab.
Polling Interval
Type a specific polling interval in milliseconds. This is how often an adapter with
a publication service checks the publishing table for new rows. The default is
5000, or once every five seconds.
Any changes to the child tables without a change in the parent table will not be
processed. The adapter monitors only the parent table for publishing.
The adapter updates the child rows by deleting all the related child rows, then
inserting child rows again based on the data in the received message. For
information on adding related tables for a publisher adapter, see Adding Child
Tables on page 73. For information on adding related tables for a subscriber
adapter, see Child Table Mappings Tab on page 87.
Do not use this option if LONG, LONG RAW, image, or variable-length BINARY
type records are published. These records cannot be bulk inserted into a
destination table.
General Tab
This tab allows you to set a termination subject or topic and specify the encoding
type, debug level, and verbose mode. Note that the adapter should communicate
only with other applications that support the same code pages or Unicode.
Click Apply to apply the changes before leaving this dialog.
The termination subject for a 4.0 project is shown below. Do not change it.
_ADB.%%InstanceId%%.TERMINATE
See TIBCO Rendezvous Concepts for information about specifying subject names.
See the TIBCO Enterprise for JMS User’s Guide for information about publishing on
a topic.
Adapter Encoding
Select the encoding from the drop down menu. The adapter may support other
encodings not shown. See Chapter 10, Setting Encoding Options, for a list of
additional encodings that can be typed into this field.
The palette does not validate encoding values that you type into the field. The
run-time adapter will throw an error if the encoding value you type is not
supported.
Debug Level
This field is valid only when the Debug logging option is selected, as described in
Logging Tab on page 58.
Select how much debugging output to provide at the console window or log file
location specified in the Log File field. The options are:
• No debug information
• Only SQL commands executed against the database
• Only the ODBC data source for each SQL command
Script File
Allows you to change the location where the SQL script file is written.
Logging Tab
Use these settings to configure a log file or log sinks, including which types of
trace messages you want logged and where they are sent. Click Apply to apply
the changes before leaving this dialog.
By default all error, warning, debug and information messages are printed in the
console window in which the adapter was started. Alternatively, you can specify
a log file and path to redirect trace output to a log file located anywhere on your
file system. The default log file name is
%%DirTrace%%/%%Deployment%%.%%InstanceId%%.log, and is saved in the same
directory where your project (repository instance) is stored.
Most errors received by the adapter are logged. The only errors that might not be
logged are any TIBCO Rendezvous or TIBCO Adapter SDK errors that appear at
startup time before tracing can be initialized.
Logging trace messages is helpful for troubleshooting. There are four levels of
trace messages that you can log: Information, Warning, Debug, and Error. Trace
messages are described and listed in Appendix B, Trace Messages.
By default, the Use Advanced Logging option is not selected. In this mode, you
configure a standard log file using the fields on this tab, as shown in the example
below.
When you select Use Advanced Logging, you configure log sinks using icons in
the TIBCO Designer project panel. This gives you complete control on selecting
the destinations and associating desired roles with each of the destinations.
Unchecked: When this box is unchecked, you configure a standard log file. This is the default.
Standard Log File Fill out the remaining fields on this tab. You do not need to read the rest of this
field description.
Checked: Log When this box is checked, you can set two standard output destinations (sinks)
Sink for trace messages and set the tracing level for the roles selected. The following
sink types are available:
• File
• STDIO
• Hawk
• Network
To create log sinks:
1. Check the Use Advanced Logging box.
2. Click Apply.
3. In the TIBCO Designer project panel, select the Log Sinks folder under the
Advanced folder.
Log File
Specify the name of the log file to which trace messages are written. This is the
same as creating a file sink. Global variables can be used to specify the location of
the log file. See Using Global Variables on page 38 for more information.
Type the name and file system path, or click Browse and select an existing log file.
If no file name is specified, trace information is not written to a file.
Debug messages should not be logged unless requested by the TIBCO Product
Support Group. This option writes a lot of information to the log file and
significantly reduces the speed of the adapter.
Startup Tab
Changing these settings is not allowed. This tab displays the default startup
behavior.
Monitoring Tab
The value for the %%deployment%% global variable can be set or modified by
selecting the session icon and then clicking the Global Variables tab in the
project panel.
The %%InstanceId%% variable does not need to be set because it is automatically
set at run time by the run-time adapter.
After configuring an adapter instance, select one or more adapter services for the
instance. All configuration tasks are performed in TIBCO Designer.
Topics
• Overview, page 66
• Adding Child Tables, page 73
• Publication Service Tabs, page 69
• Subscription Service Tabs, page 83
• Request-Response Service Tabs, page 91
Overview
The transport type (Rendezvous or JMS) you select for the run-time adapter
determines which quality of service, delivery mode, and wire format the service
can use. Only options that are compatible with a service’s transport type will be
available for selection.
Quality of service, delivery mode, and wire formats are described below.
Quality of Service
This is the level of service that determines how messages are sent.
Possible values are:
• Reliable
Queue listener objects. Even though many members listen for each inbound
message (or task), only one member processes the message. For details on
distributed queues, see TIBCO Rendezvous Concepts.
See Load Balancing Across Configurations on page 166 and TIBCO
ActiveEnterprise Concepts for more information.
• Transactional
Delivery Mode
(JMS Transport Type only) The method of delivery for a JMS message. The
semantics for these fields are somewhat more complex than the explanation given
here. See the TIBCO Enterprise for JMS User’s Guide for more information.
• Persistent
(JMS Transport Type only) A message marked non persistent will not be
available to a JMS client if the JMS server goes down. These messages are
never written to persistent storage.
Wire Formats
Services must use the same wire format to exchange data.
• Rendezvous Message (TIBCO Rendezvous Transport Type only)
When running as a publisher, the adapter extracts data from the changed rows
from database tables and publishes them on appropriate subject names.
You can configure parameters under the following tabs:
• Configuration Tab on page 69
• Tables Tab on page 71
• Publisher Options Tab on page 78
• Advanced Tab on page 82
Configuration Tab
The wire format for the publication and subscription services must be the same,
otherwise an error will occur.
Name
You can use the default name or replace it with a name of your choice. Note the
following restrictions:
• A service name must use alphanumeric characters. An underscore (_)
character can be used. The entire instance name must be less than 80
characters. The space character cannot be used in an instance name.
• A service name cannot use global variables.
Transport Type
Select the transport type (JMS or TIBCO Rendezvous) to be used by the run-time
adapter. This selection determines which options appear in the rest of the
Configuration tab.
The transport can be configured to use a trusted store and identity resource for
use in SSL (Secure Sockets Layer) configurations. TIBCO Rendezvous sessions
and JMS topics have an SSL configuration field which uses a dialog to perform
SSL configuration.
To enable and configure SSL, in the Project panel, expand the Advanced folder,
then expand the Sessions folder. Select the TIBCO Rendezvous session or JMS
topic and click Use SSL?. The SSL configuration options are explained in the
online help associated with the session dialog. Click the question mark to display
the online help.
Quality of Service
(Only available when TIBCO Rendezvous is selected as the transport type) Select
the level of service that determines how messages are sent. See Quality of Service
on page 66 for a description of these options.
• Reliable
• Certified
Wire Format
The wire format in which data will be sent. Note that the wire format for both the
publisher and subscriber must be the same, otherwise an error will occur. See
Wire Formats on page 67 for a description of these formats.
• ActiveEnterprise Message (TIBCO Rendezvous transport type only)
• Rendezvous Message (TIBCO Rendezvous transport type only)
• XML Message
Delivery Mode
(Only available when JMS is selected as the transport type) The delivery mode for
each message sending operation. See Delivery Mode on page 67 for a description
of each mode.
• Persistent
• Non-Persistent
Tables Tab
You must set publisher table options before configuring other publisher options.
Source table names can be qualified with a database user name. To access tables in
other schemas, the database user specified in the Design-time Connection Tab on
page 46 tab must have the proper set of permissions granted. This is described in
Referencing an External Schema on page 73.
If a primary key is not defined for a table, the update and delete triggers will not
be generated for the table. To define a primary key for the table, select the User
Key column in a table row. The update and delete triggers will then be defined.
Icons
• Add Table — Click to display a dialog box that list tables available to the
database user specified in the adapter Connection tab. Select the source table
to publish from when data is inserted into it.
• Add Child Table — Displays a dialog box from which a secondary table
can be added to the configuration.
• Add Table from Other Schema — Allows you to add a table from a
different schema than the current database user schema. For instructions on
granting access privileges to an external schema, see Referencing an External
Schema on page 73.
• Remove Table — Deletes the selected table from the list.
• Re-find Tables from Database — Causes TIBCO Designer to refresh
stored table schema information by retrieving new information from the
database.
Type
The primitive type.
AE Type
The primitive type mapped to an TIBCO ActiveEnterprise type.
User Key
Click to define the column as a user key.
Update Trigger?
Check the box to fire a trigger when an UPDATE statement changes a value in the
column.
Use?
Click to publish this column when data is changed.
Join To
The name of a parent table column to join to for parent-child relationships.
In addition, Oracle and Sybase users must have permission to SELECT from a
source table in an external schema. If table relationships are used, SELECT
permission is required for both parent and child tables. SELECT, INSERT, UPDATE,
and DELETE permissions are required for accessing a destination table in an
external schema.
For Sybase, execute the following before creating catalog tables for the external
schema:
sp_role "grant", sa_role, adb_schema
For SQL Server 7.0 and 2000, log in as sa and then execute the following before
creating catalog tables for the external schema:
use master
EXEC sp_addsrvrolemember 'adb_schema', 'sysadmin'
For DB2 on AS400 you can avoid table access problems by changing the
ActiveDatabase user authority to *ALLOBJ.
Adding child tables requires two separate procedures, one for the publisher
adapter and another for the subscriber. First, you add child tables for the source
table, then you add child tables for the destination table.
The database schema must be the same for all tables, but the table names can be
different. If the child table associated with the publishing table and the child table
associated with the destination table have different names, you must set a
mapping between the child tables.
The following restrictions apply to parent and child tables:
• The child table in the source database and child table in the destination
database must have the same columns.
• Currently, child tables can be defined for publishing tables configured as
follows:
— TIBCO Rendezvous Transport type using the TIBCO ActiveEnterprise wire
format
— JMS Transport type using the XML wire format
• When parent-child relationships are defined, a subscriber adapter must use
the same repository as the publisher adapter.
When you add a child table, TIBCO Designer creates a class object in the
repository for the child table, and an association object for the relationship.
To enable publishing child table related data, the publisher adapter properties file
must have the adb.publishChildData option set to on.
After adding child tables for a subscriber adapter, you create mappings between
child tables on the publisher side and child tables on the subscriber side. For
instructions, see Child Table Mappings Tab on page 87.
To add child tables for parent-child relationships, do the following in the
Publication Service Tables Tab:
1. Click the name of the parent table to select it.
2. Click the Add Child Table icon. The Add Table dialog displays.
3. Select the related child table from the list and click OK.
4. Repeat the above steps to add more child tables.
When all of the child tables are added, you then designate a foreign key column
as a key in each child table so that a relationship to the parent table can be
defined.
5. Click the User Key checkbox for the foreign key column in the child table to
select it. A key icon displays next to the column name.
You must also specify the relationship between the primary column in the parent
table and the foreign key column in the child table.
6. Click in the Join To field for the child table column, and select the name of
the parent table primary key column from the drop-down list.
7. Click Apply.
In the following example, a publication service that publishes newly inserted
rows into the source table is created. Publisher Options Tab on page 78 explains
how to configure the publisher adapter to publish data by value or by reference.
In the following example, a subscription is created such that received data will be
inserted into the SUB_ORDER_DETAILS destination table. All three columns of the
destination table are configured to receive data.
The following example shows a child table mapped. The left column (Subscriber
Child Table Name) contains the subscriber child table and the right column
(Publisher Child Table Name) contains the publisher child table.
DB2/OS390 Options
This tab appears when the Vendor field in the Adapter Instance Configuration
Tab is set to DB2 OS390.
When the DB2 load utility loads rows to the source table, it does not activate the
table’s INSERT triggers. Loaded data is not published.
Database Name
Enter the name of the database that you want to put your publisher table in.
Storage Group
Optional. Enter the designator of the storage group that will hold the publisher
table indexes.
Buffer Pool
Optional. Enter the name of the buffer pool to be used for indexes.
Index Suffix
Enter a suffix of your choice, up to 13 characters, that the adapter will append to
each of the indexes (IDX1_, IDX2_, and IDX3_).
Trigger Suffix
Enter a suffix of your choice, up to 5 characters, that adapter software will append
to each of the triggers (T1, T2, and T3).
Publish by Value
With Publish by Value, all specified columns in the source table are copied to
the publishing table. Publishing by value is fast, but does not support some data
types, for example Oracle LONG and LONG RAW.
Note the following restrictions on publishing tables when you publish by value:
• Publishing tables cannot contain columns with LONG data types. If you have
a source table that contains a column with a LONG data type, that column
cannot be specified for inclusion in the publishing table. This is because the
trigger generated by the palette cannot refer to the LONG column via the :new
construct.
This is an Oracle restriction documented in the Oracle SQL Reference manual.
The problem is not detected by Oracle during trigger creation. However,
when the trigger fires and it attempts to copy the LONG column value to the
publishing table, the database connection will hang for some time and then
eventually terminate.
• If you define parent-child relationships between tables, the publishing table
that is created for a parent table should not contain a column with a LONG
data type. However, a child table can contain a column with a LONG data
type. This is because data on child table rows is not copied using the :new
construct.
• LONG RAW data is not allowed in the publishing table.
These restrictions do not apply to publishing tables when you publish by
reference and LONG or LONG RAW are non-key types.
In this example, loop detection is enabled. If a subscription exists that uses the
same subject and CUSTOMER as the destination table, any changes to CUSTOMER will
not be published repeatedly.
Publish by Reference
With Publish by Reference, only key column values are copied to the
publishing table. The publish by reference feature allows you to publish data
directly from the source table without first copying the data from the source table
to a publishing table. A trigger, stored procedure, and publishing table are
created, but the publishing table contains the necessary adapter fields and only
the key fields of the source table. For more information, see Start or Stop the
Adapter on page 111.
The advantage of publishing by reference is that the data to be published is stored
just once. Also, data types such as Oracle LONG and LONG RAW are supported
for publishing by reference.
To use a view or other database object as the source table, you can configure the
adapter to publish by reference object, where key columns are stored in the
publishing table and data to publish is selected from the reference object. For
details, see Publishing by Reference Object on page 192.
Example
In the following example, the publisher adapter is configured to publish from the
P_CUSTOMER table with a key field CUST_ID. The publishing table is created with
the necessary fields and the CUST_ID field. When a row in the P_CUSTOMER table is
modified, the trigger fires, populating fields and copying the CUST_ID value to the
publishing table. When the adapter polls the publishing table, it detects the new
row and selects from the P_CUSTOMER table using the CUST_ID value found in the
publishing table. Then the message is published.
Storage Mode
• Publish by Value copies all specified columns in the source table to the
publishing table.
• Publish by Reference copies only key column values to the publishing table. If
no key column is defined in the database, a substitute non-key column must
be defined to publish by reference.
Publishing Table
Name of the database table used to store a copy of data to be published. The table
name cannot be qualified by a schema name. The publishing table cannot contain
any user-created columns where the column name starts with ADB_. These
characters are reserved for use by the adapter.
A common practice is to use the publishing table name prefixed by P_. For
example, if your source table is MY_ORDER, its publishing table should be named
P_MY_ORDER.
Update Mode
Select the method by which tables are updated.
• Update updates a row in the destination table only if the row exists.
• Upsert updates a row in the destination table if the row exists. If no such row
exists, it performs an insert.
Advanced Tab
Destination
(Only available when JMS is selected as the transport type in the Adapter Instance
Configuration Tab)
The publisher destination. A service uses a default destination generated using
the Domain and Deployment global variables, the adapter acronym, the adapter
instance name and the service name. If you use this default destination, make sure
the values for Domain and Deployment are not empty.
Alternatively, you can manually enter a destination in this field. The destination
does not have to be predefined in the JMS Server, and it can be static or dynamic.
See the TIBCO Enterprise for JMS User’s Guide for information about destinations.
Message Subject
(Only available when TIBCO Rendezvous is selected as the transport type in the
Adapter Instance Configuration Tab)
Publisher subject. By default, a service uses a message subject that is generated
using the Domain and Deployment global variables, the adapter acronym, the
adapter instance name and the service name. If you use this default subject, make
sure the values for Domain and Deployment are not empty. You can type a TIBCO
Rendezvous subject name different from the default in this field.
See TIBCO Rendezvous Concepts for information about specifying subject names.
Endpoint Reference
Displays the endpoint reference. Click the Browse icon to change the endpoint
reference, the Go To icon to reconfigure the existing reference, or the Delete icon
to delete the reference. Endpoint reference objects are explained in TIBCO
Designer Palette Reference.
Class Reference
Click the Go To icon to reconfigure the existing reference. "Clear reference" can be
used to remove the reference under Endpoint Reference. Class reference objects
are explained in TIBCO Designer Palette Reference.
Configuration Tab
Name
Type a name unique among all subscribers defined for this project. You can use
the default name or replace it with a name of your choice.
• A service name must use alphanumeric characters, including underscore (_).
You cannot use a blank space. The entire instance name must be less than 80
characters.
• A service name cannot use global variables.
Transport Type
Select the transport type (JMS or TIBCO Rendezvous) to be used by the run-time
adapter. This selection determines which options appear in the rest of the
Configuration tab.
The transport can be configured to use a trusted store and identity resource for
use in SSL (Secure Sockets Layer) configurations. TIBCO Rendezvous sessions
and JMS topics have an SSL configuration field which uses a dialog to perform
SSL configuration.
To enable and configure SSL, in the Project panel, expand the Advanced folder,
then expand the Sessions folder. Select the TIBCO Rendezvous session or JMS
topic and click Use SSL?. The SSL configuration options are explained in the
online help associated with the session dialog. Click the question mark to display
the online help.
Quality of Service
(Only available when TIBCO Rendezvous is selected as the transport type) Select
the level of service that determines how messages are sent. See Quality of Service
on page 66 for a description of these options.
• Certified
• Reliable
• Distributed Queue
Wire Format
The wire format in which data will be sent. Note that the wire format for both the
publisher and subscriber must be the same, otherwise an error will occur. See
Wire Formats on page 67 for a description of these formats.
• Rendezvous Message (TIBCO Rendezvous only)
• XML Message (TIBCO Rendezvous or JMS)
• ActiveEnterprise Message (TIBCO Rendezvous only)
Delivery Mode
(Only available when JMS is the transport type and Topic is the connection factory
type) The delivery mode for each message sending operation. See Delivery Mode
on page 67 for a description of each mode.
• Persistent
• Non-Persistent
Table Tab
You must set subscriber table options before configuring other subscriber options.
An incoming message need not contain data for all the columns defined in the
subscriber table. An adapter can be configured to expect only a subset of the
columns. The adapter checks the repository for attributes defined in the
subscriber table's class object definition. When a message arrives, the adapter
iterates through the attributes in the subscriber table’s class object definition and
looks for those same attributes in the incoming message.
Subscriber table names can be qualified with a schema name, such as SCOTT.EMP.
To access tables in other schemas, the database user defined in the adapter
Connection tab must have the proper set of permissions granted. For details, see
page 10.
When configuring the destination table, subscribe only to columns that should be
updated. If you subscribe to a column that should not be updated and a message
arrives with no data for that column, a NULL will be written to that column. For
example:
• If a source table is configured to send data for columns, c1, c2 and c3 and the
destination table is configured to receive data for columns c1, c2, c3, c4, and
c5:
— For the TIBCO Rendezvous message wire format, columns c1, c2, and c3
will get the data and columns c4 and c5 will get a NULL value.
— For the TIBCO ActiveEnterprise message and XML message wire format,
columns c4 and c5 will be ignored and take on whatever default values
they are supposed to have.
• If a source table is configured to send data for columns, c1, c2, and c3 and the
destination table is configured to receive data for columns c1, c2, and c3 but
not configured to receive data for columns c4 and c5, columns c4 and c5 will
retain the defaults applicable to both tables.
Add Table — Click to display a dialog box that list tables available to the
database user specified in the adapter Connection tab. Select the table to be
used as the subscription table where data is inserted when received.
Add Child Table — Displays a dialog box from which a secondary table
can be added to the configuration.
Add Table from Other Schema — Allows you to enter a schema. For
instructions on granting access privileges to an external schema, see
Referencing an External Schema on page 73.
Remove Table — Deletes the selected table from the configuration.
Re-find Table from Database — Causes TIBCO Designer to refresh
stored table schema information by retrieving new information from the
database.
Allow Key Columns Only — If selected, child columns are joined only to
a key colulmn. If unselected, child columns can be joined to any column.
These options are only active when child tables have been specified on the Table
Tab.
The following example shows a child table mapped. The left column (Subscriber
Child Table Name) contains the subscriber child table and the right column
(Publisher Child Table Name) contains the publisher child table.
Database Name
Enter the name of the database that you want to put your exception table in.
Exceptions Table
Name of exception table where data is written, if the adapter cannot write to the
subscriber table. This table will hold messages that caused an exception. If the
table does not exist, the subscriber adapter creates it. For details, see Exception
Table on page 177.
The exception table cannot contain any user-created columns where the column
name starts with ADB_. These characters are reserved for use by the adapter.
Advanced Tab
Message Subject
(TIBCO Rendezvous Transport type only)
By default a service uses a message subject that is generated using the Domain and
Deployment global variables, the adapter acronym, the adapter instance name
and the service name. If you use this default subject, make sure the values for
Domain and Deployment are not empty. You can type a TIBCO Rendezvous
subject name different from the default in this field. See TIBCO Rendezvous
Concepts for information about specifying subject names.
Destination
(JMS Transport type only)
The subscriber destination. A service uses a default destination generated using
the Domain and Deployment global variables, the adapter acronym, the adapter
instance name and the service name. If you use this default destination, make sure
the values for Domain and Deployment are not empty.
Alternatively, you can manually enter a destination in this field. The destination
does not have to be predefined in the JMS Server, and it can be static or dynamic.
See the TIBCO Enterprise for JMS User’s Guide for information about destinations.
Endpoint Reference
Displays the endpoint reference. Click the Browse icon to change the endpoint
reference or the Go To icon to reconfigure the existing reference. You can also click
the Delete icon to remove the reference. Endpoint reference objects are explained
in TIBCO Designer Palette Reference.
Class Reference
Click the Go To icon to reconfigure the existing reference. Class reference objects
are explained in TIBCO Designer Palette Reference.
This service is often called a Request Reply Server or RPC (Remote Procedural
Call) Server. When running as a Request-Response Service, the adapter receives
requests from other applications, parses them, calls the appropriate component
interface API to set the input fields, then calls another set of component interface
APIs to get the output fields. The output fields are wrapped in a schema and sent
back to the caller.
A Request-Response Service is renamed ADBServer when you drag its icon into
the design panel. Configuration involves specifying its name, quality of service
and wire format. A server operation allows the adapter to process requests from
client applications and return results in a response to the client.
When using the RPC server, you can configure custom operations. These are
configured under the Call Operation Tab.
You can configure parameters under the following tabs:
• Configuration Tab on page 91
• Call Operation Tab on page 94
• Advanced Tab on page 96
Configuration Tab
Name
Type a name unique among all request-response services defined for this project.
You can use the default name or replace it with a name of your choice.
• A service name must use alphanumeric characters, including underscore (_).
You cannot use a blank space. The entire instance name must be less than 80
characters.
• A service name cannot use global variables.
Transport Type
Select the transport type (JMS or TIBCO Rendezvous) to be used by the run-time
adapter. This selection determines which options appear in the rest of the
Configuration tab. Only the options that are available with the selected Transport
Type, Connection Factory Type, Mode or Wire Format are displayed.
The transport can be configured to use a trusted store and identity resource for
use in SSL (Secure Sockets Layer) configurations. TIBCO Rendezvous sessions
and JMS topics have an SSL configuration field which uses a dialog to perform
SSL configuration.
To enable and configure SSL, in the Project panel, expand the Advanced folder,
then expand the Sessions folder. Select the TIBCO Rendezvous session or JMS
topic and click Use SSL?. The SSL configuration options are explained in the
online help associated with the session dialog. Click the question mark to display
the online help.
Quality of Service
Select the level of service that determines how messages are sent. See Quality of
Service on page 66 for a description of these options.
• Certified
• Reliable
• Distributed Queue
Delivery Mode
(Only available when JMS is selected as the transport type) The delivery mode for
each message sending operation. See Delivery Mode on page 67 for a description
of Persistent and Non-Persistent.
• Durable (see Persistent)
• Non-Durable (see Non-Persistent)
Mode
The server mode.
• Request Reply is the basic request-reply mode. The server subscribes to the
request and publishes the reply.
• RPC allows you to configure an adapter to act as an RPC (remote procedure
call) server on behalf of a client.
Wire Format
The wire format in which data will be sent. Note that the wire format for both the
publisher and subscriber must be the same, otherwise an error will occur. See
Wire Formats on page 67 for a description of these formats.
• Rendezvous Message (TIBCO Rendezvous only)
• XML Message (TIBCO Rendezvous or JMS)
• ActiveEnterprise Message (TIBCO Rendezvous only)
If you change the stored procedure or database connection while editing your
project, you must return to this dialog and click Refresh to retrieve the changes
from the database.
Name
Enter a unique name for the call operation.
Catalog/Package
(Optional, only applicable to databases that have more than one catalog or
package.) The catalog or package in which the procedure resides. This name is
used to resolve naming conflicts if more than one catalog or package in the
database has the selected procedure with the same name. See your database
documentation for more information about catalogs and packages.
Schema
(Optional) The schema in which the procedure resides. This name is used to
resolve naming conflicts if more than one schema in the database has the selected
procedure with the same name.
Procedure Name
Name of the database procedure to call.
Select Procedure
Queries the database for available procedures for the Procedure Name field.
Clicking this button displays a dialog showing the available procedures.
To select a procedure:
a. Select a call operation from the list on the left. Its input and output
parameters, if any, are displayed in the fields on the right side of the
dialog.
b. Click Select Procedure.
Maximum Rows
(Optional) The maximum number of rows to retrieve.
One way
(Optional) Check this box if you want to execute this procedure using one-way
operation. If left unchecked, the procedure will execute using two-way operation.
Advanced Tab
Message Subject
(TIBCO Rendezvous Transport Type only)
By default a service uses a message subject that is generated using the Domain and
Deployment global variables, the adapter acronym, the adapter instance name
and the service name. If you use this default subject, make sure the values for
Domain and Deployment are not empty. You can type a TIBCO Rendezvous
subject name different from the default in this field. See TIBCO Rendezvous
Concepts for information about specifying subject names.
Destination
(JMS Transport type only)
The subscriber destination. A service uses a default destination generated using
the Domain and Deployment global variables, the adapter acronym, the adapter
instance name and the service name. If you use this default destination, make sure
the values for Domain and Deployment are not empty.
Alternatively, you can manually enter a destination in this field. The destination
does not have to be predefined in the JMS Server, and it can be static or dynamic.
See the TIBCO Enterprise for JMS User’s Guide for information about destinations.
Reply Subject
Type a TIBCO Rendezvous subject name that the adapter uses to response, if no
response subject is specified in the request message.
Endpoint Reference
Displays the endpoint reference. Click the Browse icon to change the endpoint
reference or the Go To icon to reconfigure the existing reference. You can also click
the Delete icon to remove the reference. Endpoint reference objects are explained
in TIBCO Designer Palette Reference.
Class Reference
Click the Go To icon to reconfigure the existing reference. Class reference objects
are explained in TIBCO Designer Palette Reference.
Topics
• Overview, page 98
• Create an EAR File in TIBCO Designer, page 99
• Deploy the Project, page 100
• Start or Stop the Adapter, page 102
• Monitor the Adapter, page 103
Overview
Enterprise Repository
Feature
Edition Edition
tomcat web server Yes Yes
The modules are optional. That is, Repository Edition can be installed with or
without the User Management module. The User Management module is
required to set security options for adapter projects.
Generate an Enterprise Archive file (EAR) that contains information about the
adapter services to deploy.
The EAR file contains information on what you wish to deploy. This could be one
or more adapter services, one or more TIBCO BusinessWorks process engines, or
both.
Building an archive creates the EAR file, which you can then deploy from TIBCO
Administrator. If you make changes to the business processes or adapter services
included in the archive, you need to rebuild the archive. Saving the project does
not affect the archive.
See Also
See the TIBCO Designer User’s Guide for more information about this procedure.
The guide is available from the Designer Help menu.
Before deploying a project, the machine on which the adapter is installed must be
part of a TIBCO administration domain. After you have installed the TIBCO
Administration Server, any machine on which you install TIBCO Runtime Agent
(required by an adapter) can be added to the administration domain. The TIBCO
software installed on the machine is then visible and accessible via the TIBCO
Administrator GUI.
When you deploy a project, startup scripts and other information about the
different components are sent to the machines to which the components were
assigned. The project data store and TIBCO Administration Server are updated
with the deployed components.
To deploy a project:
1. Import the EAR file into TIBCO Administrator Enterprise Edition.
2. Assign adapter archives in the EAR file to adapters installed in the
administration domain and likewise assign process archives to process
engines.
3. Specify startup options for each adapter service.
4. If desired, set up your deployment for fault tolerance by specifying more than
one adapter service to run on different machines. The secondary services will
run in standby mode until they are needed.
Password Handling
At design-time, the adapter uses a password to connect to the backend
application and fetch metadata. At run-time, the adapter uses a password to
connect to the back-end application and interoperate with it. If you create a 4.x
configuration using TIBCO Designer 5.1, and use the configuration against a 4.x
adapter version, some special considerations are required for security.
When deploying the adapter check the Service property of the global variable in
the global variables section, then go to the Advanced tab of the adapter archive
and set the password value under the Run-Time Variables section.
Do not set the password to type Password in the global variables section for
adapter configurations that are set to AE Version 4.0 or AE Version 5.0 (in the
Configuration tab Version field) or any intermediate version.
See Also
See the TIBCO Administrator User’s Guide for an introduction to the TIBCO
administration domain and detailed information about the above steps.
See the TIBCO Administrator Server Configuration Guide for fault tolerance
information.
See Also
See the TIBCO Administrator User’s Guide for more information.
See Also
See the TIBCO Administrator User’s Guide for information about configuring the
above monitoring options.
This chapter explains how deploy an adapter, then start and stop it on the
command line. Repository Edition is used to manage adapter projects.
Topics
Overview
If your adapter is not used in a TIBCO BusinessWorks process, you can use
TIBCO Administrator Repository Edition to manage adapter projects.
If your adapter is used in a TIBCO BusinessWorks project, you must use TIBCO
Administrator Enterprise Edition to deploy and manage your projects. See
Chapter 6, Deploying and Starting the Adapter Using TIBCO Administrator
Repository Edition, on page 105 for details.
See Overview on page 98 for a description of features available in both Enterprise
Edition and Repository Edition.
In TIBCO Designer, after configuring, verifying and testing your project, export
the project to a server repository.
1. Click Project>Export Full Project.
2. Click the Server Repository tab in Export Project.
See Also
See the TIBCO Designer User’s Guide for details about the required fields. The
guide is available from the Designer Help menu.
Before starting the adapter you must create a properties file or edit the default
properties file. Each run-time adapter instance must have a unique properties file.
The easiest way to deploy an adapter is to copy the default adadbagent.tra file
to a unique name and edit the properties defined in the file.
To create a properties file:
1. Navigate to the adapter installation area:
cd <install-path>\tibco\adapter\adadb\5.1\bin
2. Copy the default adadbagent.tra file to a unique name.
3. Edit the predefined properties in the copied file as explained in Set Properties
in Properties File on page 109.
tibco.repourl tibcr@ADBDemo1
tibco.configurl rvpub
application.args adbagent -system:propFile
C:/tibco/adapter/adadb/5.1/bin/adbagent.tra
application.start.dir C:/tibco/adapter/adadb/5.1/bin/
See Also
Adapter Properties File on page 115
You must have installed TIBCO Administrator Repository Edition with the User
Management module to assign security options. Setting security options is not
required, but recommended.
The User Management module allows authorized users to specify security
options for a TIBCO administration domain. Security has two components:
• Authentication. Specify users and passwords.
• Authorization. Give users access to individual components in the TIBCO
administration domain.
By default, the administrative user for the administration domain has privileges
to create users and assign privileges. That user can create additional users with
the same full access privileges if appropriate.
Roles
TIBCO Administrator allows you to create a roles tree and assign users to one or
more roles. You can then perform authorization on a per-role basis.
This capability is critical, for example, if a large number of users need read access
to information about running projects but only a few users should be authorized
to start and stop the project.
Authorization
TIBCO Administrator allows privileged users to authorize users for GUI Access
or Data Access (or both).
• GUI access is given on a per-tab basis. For each tab you can select in the
TIBCO Administrator GUI, you can specify which users are allowed read or
write privileges.
• Data access is given on a per-data store basis. A repository data store is
associated with each project. You can set various levels of access (read, write,
variables) for data stores of each deployed project and for the system data
store.
See Also
See the TIBCO Administrator User’s Guide for details about creating roles and
authorizations.
You can run the adapter as a console application using a custom properties file.
For example, the next command line starts the adapter instance that is identified
in the adbagentpub.tra properties file, which is located in the same directory as
the executable. The absolute path name to the properties file must be given if it is
located in a different directory than the executable. In other words, if the
properties file is not in the default location with the default name, you must
explicitly specify the absolute pathname of the properties file on the command
line.
adbagent --run --propFile \opt\adapter\adadb\5.1\bin\adbagent.tra
See Adapter Properties File on page 115 for information about changing the
properties file.
Option Description
--run --propFile fileName Launches the adapter using the specified properties file.
This is the default option, if no options are specified on the
command line.
Option Description
--install --propFile fileName Microsoft Windows Only. Installs the application as a
Windows Service using the specified properties file.
If propFile is not given, the properties file prefix must have
the same name as the adapter executable prefix.
--uninstall --propFile fileName Microsoft Windows Only. Uninstalls the Windows Service
associated with the adapter.
If propFile is not given, the properties file prefix must have
the same name as the adapter executable prefix.
--start --propFile fileName Microsoft Windows Only. Start the Windows Service using
the specified properties file.
If propFile is not given, the properties file prefix must have
the same name as the adapter executable prefix.
--stop --propFile fileName Microsoft Windows Only. Stops the Windows Service using
the specified properties file.
If propFile is not given, the properties file prefix must have
the same name as the adapter executable prefix.
Recommended Methods
• (JMS or TIBCO Rendezvous transport) Using TIBCO Hawk Display, invoke
the stopApplicationInstance() or terminateADBAgent() method.
• (JMS or TIBCO Rendezvous transports) From a command window that the
adapter is not running in, send a message on the terminate subject.
• (JMS transport) Send a JMS message through a Topic session.
Changing the termination subject is described in General Tab on page 56.
Alternative Methods
• (TIBCO Rendezvous transport on Windows only) Use the task manager to
stop the adapter.
• (TIBCO Rendezvous transport on UNIX only) Use the command kill -9.
If you have installed TIBCO Hawk, you can use the methods defined in the
adapter’s standard and custom microagents to monitor it.
See Also
For details about monitoring, see Chapter 11, Monitoring the Adapter, on
page 231.
The run-time adapter parses a properties file at startup. The default run-time
adapter properties file is named adbagent.tra.
The default properties file is located in the install-path\bin subdirectory.
Each line in a properties file is a single property. Each property consists of a key
and a value. The key starts with the first non-whitespace character and ends at the
first "=", ":", or whitespace character. The value starts at the first character after
the equal sign (=). For example:
tibco.configurl=/tibco/private/adapter/test/config/config1
tibco.repourl=tibcr://TEST_PROJECT
tibco.username=admin
tibco.password=samplePassword
tibco.clientVar.service=7600
tibco.clientVar.daemon=tcp:7600
Properties defined in the properties file override the same properties defined in
the project.
Required Properties
In order for a properties file to be used with a run-time adapter, the following
properties must be correct for the adapter’s configuration.
All paths inside a properties file, including Windows directory names, must use
forward slashes.
Property Description
tibco.repourl repourl The absolute pathname to the local repository where the adapter
instance is defined. For example:
C:/TIBCO/LocalRepositories/repo.dat
For a remote project, the repourl value should use the form
tibco.repourl tibcr@name where name is the repository name. For
example:
tibco.repourl tibcr@ADBRepoDefault
For Unix systems, the path separator should include a single slash, "/".
For example: /local/tibco/repo/repo.dat
See Project Locator String on page 126 for more information.
tibco.configurl The location of the adapter service inside the project file. If a relative
relative_path path is specified, the adapter service is assumed to be under the
default area in the project file (/tibco/private/adapter/). For
or
example, the following value connects to an adapter service named
tibco.configurl adbpub in the /tibco/private/adapter/ directory:
absolute_path tibco.configurl adbpub
Additional Properties
You can modify the following parameters as necessary. Properties that start with
ntservice are available only on Microsoft Windows platforms.
All paths inside a properties file, including Windows directory names, must use
forward slashes.
Description
Property
Description
Property (Cont’d) (Cont’d)
adb.debug The debug printing level. If not specified, the default, 0, is
used. Possible values are:
0 - No debug information displayed.
1 - SQL commands executed against the database display.
2 - In addition to 1, the ODBC data source for each SQL
command displays.
3 - Displays values for all ODBC placeholders.
adb.dsn ODBC system data source name. If not specified, the system
data source name is read from the repository.
ibm-1370 Big5
tibx-eucJP EUC-JP
ibm-1386 GBK
LATIN_1 ISO8859-1
ibm-949 KSC-5601
UTF8 UTF8
adb.password Password for the user account used to access your database.
If not specified, the password stored in the repository is
used.
Description
Property (Cont’d) (Cont’d)
adb.PollingBatchSize Applies only to publisher instances. Limits the amount of
messages to be picked up. The value indicates the number
of parent rows to fetch for a poll interval. The default value,
0, indicates that all new rows should be fetched.
Description
Property (Cont’d) (Cont’d)
adb.publishChildData Either on or off. Applies only to publisher instances.
Enables publishing of table rows related to the source
publishing table. By default, related table rows are not
published.
Description
Property (Cont’d) (Cont’d)
adb.useExceptTable on|off Enables the use of the exception table. The exception table is
defined when a subscription is created.
adb.verbose on|off Verbose mode. Print all available information to the console
window or log file location. By default the verbose mode is
off.
ntservice.binary.path.absolute Absolute path to the executable that is run when the service
is started. For example:
ntservice.binary.path.absolute
C:/tibco/adapter/adadb/5.1/bin/adbagent.exe
Description
Property (Cont’d) (Cont’d)
ntservice.name Name for this Windows Service.
This property is useful if you wish to have multiple
Windows Services for the same executable. That is, you may
wish to have two adapters running on the same machine.
By specifying different service names and display names
for the adapters, you can accomplish this.
For example:
ntservice.name adapter_instance_name
ntservice.starttype automatic
You can use this property to initially set the start type for
the service, but once the service is installed, use the
Windows Services control to change the start type of
services.
Description
Property (Cont’d) (Cont’d)
tibco.username User name and password used by the repository server to
access the project. The password can be obfuscated using
tibco.password
the instructions in Obfuscating or Encrypting a Password in
the Properties File on page 123.
Password Handling
At design-time, the adapter uses a password to connect to the backend
application and fetch metadata. At run-time, the adapter uses a password to
connect to the back-end application and interoperate with it. If you create a 4.x
configuration using TIBCO Designer 5.1, and use the configuration against a 4.x
adapter version, some special considerations are required for security.
If you plan to run the adapter locally, define the run-time password value to be a
global variable. Before starting the adapter, include the run-time password as
client variable in the adapter's .tra file and obfuscate it using obfuscate tool. For
example, if the password value is defined as %%myPassword%%, create a global
variable named myPassword in the global variables section with no value and
include the following entry in the adapter's .tra file:
tibco.clientVar.myPassword
Do not set the password to type Password in the global variables section for
adapter configurations that are set to AE Version 4.0 or AE Version 5.0 (in the
Configuration tab Version field) or any intermediate version.
Obfuscating a Password
The run-time adapter needs a password to access the backend database. If you
have unchecked the Remember Password checkbox in the Design-time
Connection tab, the global variable %%adb.password%% is saved in the project. For
run-time, you open the .tra file and add the password in clear text in the
tibco.clientVar.adb.password=#password property. You can use the obfuscate
tool to hide this password so it cannot be viewed by unauthorized users.
If you don’t want to obfuscate the password, remove the # at the beginning of the
password.
5. Run the obfuscation tool supplied with the adapter against the properties file.
This tool is named obfuscate.exe and resides in the
TIBCO_home\tra\5.1\bin directory.
The command syntax is:
obfuscate tra_file_pathName
where tra_file_pathName is the absolute pathname of the adapter properties file
that contains the tibco.clientVar.adb.password=#password property.
For example, on Windows:
C:\tibco\tra\5.1\bin>obfuscate
C:\tibco\adapter\adadb\5.1\bin\adbagent.tra
The password is now obfuscated and you can start the adapter with the
changed properties file.
Encrypting a Password
Encryption is only supported for version 5 adapters and higher. If you have a
property in a properties file the needs to be encrypted, follow these steps:
1. In the property file, add the #! characters in front of the value you wish to
encrypt. For example:
This section explains the project locator string that is given as a value to the
tibco.repourl, which is specified in the TIBCO Adapter for ActiveDatabase
properties file.
There are two types of project locator strings: Server-based Project Locator String
and Local Project Locator String. These are described in the next sections.
tibcr@myInst:service=5456:urlFile=/tibco/props/fredsProps.txt
tibcr://myInst:urlFile=/tibco/props/fredsProps.txt
The fields in an example string are described below. Only the first two fields
shown below are required.
tibcr:// or tibcr@ tibcr@
userName Any identifier (null or empty implies read only with guest privileges)
regionalSubject TIBCO Rendezvous subject prefix used for regional read-operation in the load
balancing mode. For additional information see the chapter on load balancing in
the TIBCO Administrator Server Configuration Guide.
urlFile This can either be a fully qualified path or a relative path. The file can contain
any of the optional parameters listed in this table. Property values starting with
# are considered obfuscated.
The properties in this file are appended to the repository locator string. If the
same property appears in both the locator string and the properties file, the
properties in the locator string take precedence.
https://host:8443/administrator/repo?urlFile=httpsProps.ini&myInst
https://host:8443/administrator/repo?urlFile=httpsProps.ini
The fields in an example string are described below. Note that the port and the
&myInst parameters are optional, and the urlFile field is required only for
HTTPS.
HTTP or HTTPS https://
Host name host
Port (optional) :8443
Repository locator string /administrator/repo
Required character ?
urlFile (required only for HTTPS) urlFile=httpsProps.ini
Field Description
HTTP or Use HTTP// or HTTPS// as appropriate.
HTTPS
? Required character.
urlFile Required for HTTPS, optional for HTTP. This can either be
a fully qualified path or a relative path. The file can contain
any of the optional parameters listed below. Property
values starting with # are considered obfuscated.
The properties in this file are appended to the repository
locator string. If the same property appears in both the
locator string and the properties file, the properties in the
locator string take precedence.
Remote HTTP and HTTPS clients support the following optional parameters.
Each parameter must be separated by the character &.
userName Any identifier (null or empty implies read only with guest
privileges)
./instances/myInst.dat:userName=deborah
c:/tibco/repository/instances/myInst.dat:urlFile=c:/tibco/repository/props/deborah
myProj.dat
myProj
myProj/myrepo.dat
The fields in an example local repository string are described below. Note that
only the instance name is required; this can be a fully qualified path or a relative
path. The localrepo@ and .dat entries are optional, as are any parameters listed
in Table 11.
Optional localrepo@
Instance name (required) c:/tibco/repository/instances/myInst
Optional .dat
Optional parameters (separated by : ) :userName=deborah
Parameter Description
userName Any identifier (if not present or empty makes a read-only client)
urlFile This can either be a fully qualified path or a relative path. The
file can contain any of the optional parameters listed in this
table. Property values starting with # are considered obfuscated.
The properties in this file are appended to the repository locator
string. If the same property appears in both the locator string
and the properties file, the properties in the locator string take
precedence.
The following command lines show how to install the adapter adbagent as a
service, start the service, stop the service, and uninstall the service. Because no
properties file is specified, the default properties file, adbagent.tra, is used. In
this file, the default service name and service display name are the same: TIBCO
Adapter for ActiveDatabase.
• Install the adapter as a service using the service name and service display
name specified in the default properties file:
adbagent --install
4. Start the adapter instance, specifying the appropriate properties file on the
command line. This starts an adapter service with the service name and
display name defined in that selected properties file.
5. Run the start command again, specifying a different properties file. Another
adapter service is started, using the different service name and display name.
This chapter explains how to configure and start an alerter for each supported
database.
Topics
Introduction
Oracle
An alerter for Oracle is available on all operating systems supported by the
adapter. The alerter is a separate program that can be used in the TIBCO Adapter
for ActiveDatabase environment in cases where changes are infrequent and
polling by the publisher adapter would result in unnecessary and expensive
operations.
DB2
There is no alerter for DB2.
DBMS_PIPE
commit_and_notify Alerter
TIBCO Adapter for
ActiveDatabase
Source Table
Publishing Table
TIBCO Messaging
If there are multiple publishing tables under the same database account, you can
use the commit_and_notify_table procedure to specify that only a particular
table be checked by the adapter. This prevents the adapter from needlessly
checking all its publishing tables for updates when only one table has been
updated with new data. This notification can be sent to one or more instances.
Before Starting
Make sure you have executed the alerter.sql file against the database account
used by the adapter, as described in Post-Installation Tasks in the TIBCO Adapter
for ActiveDatabase Installation Guide.
In addition, the database account must have execute permission set on the
DBMS_PIPE package. To set this, type the following in sqlplus (while logged in
under the system account):
SQL> grant execute on dbms_pipe to userid
Option Description
-dsn dsn The ODBC DSN you are connecting to
-id adapter_instance _name The name of the adapter instance to notify. One or
more configuration names can be given, separated
by a space character. This option must be last on
the command line if more than one instance is to
be notified.
The procedure puts a message on an Oracle DBMS pipe. The alerter captures
this message, and publishes a TIBCO Rendezvous notification message to all
publisher configurations that were included on the alerter command line. The
publisher adapter then reads its publishing table and sends a message
containing the changed data on its configured subject.
This example shows how to tell the adapter instance to poll a single table,
PUB_ORDER, for changes. Use the commit_and_notify stored procedure to
poll all publishing tables for changes.
5. Terminate the alerter process by executing the following stored procedure:
SQL> execute stop_alerter;
Before Starting
A database account must have been created for running the adapter. This is
typically done after installation. See the TIBCO Adapter for ActiveDatabase
Installation Guide for details.
Alerter Setup
Before using the alerter you must copy the alerter dynamic link library
adbalerter_mssql.dll to the Binn directory where SQL Server is installed, add
the notify and notifytable external stored procedures to the master database
and set execute permission on the procedures for the database account used by
the adapter.
1. Open a command window and change directory to the install-path\bin
directory.
2. Copy the alerter library to the Binn directory where SQL Server is installed,
for example:
copy adbalerter_mssql.dll \Mssql7\Binn
3. Ensure the procedures are not already defined in the master database:
isql -Usa -Ppassword
1> sp_dropextendedproc notify
2> go
1> sp_dropextendedproc notifytable
2> go
1> DBCC adbalerter_mssql(FREE)
2> go
DBCC execution completed. If DBCC printed error messages,
contact your system administrator.
5. Set access permissions for the database account used by the adapter:
1> grant execute on notify to database_account
2> go
1> grant execute on notifytable to database_account
2> go
1> exit
You can also execute the notify procedure for more then one adapter
instance. Each configuration name must be separated using a space character.
For example:
1> execute itaska.master.dbo.notify @agentname='agentone
agenttwo agentthree'
2> go
The notifytable procedure can be invoked for one or more adapter instances
and one publishing table. If the database used by the adapter and master
database are on the same database server, the server prefix need not be given.
1> execute itaska.master.dbo.notifytable
@agentname='agentone agenttwo',@tablename='P_ORDER_TABLE’
2> go
Before Starting
A database account must be created for running the adapter. This is typically
done after installation. See the TIBCO Adapter for ActiveDatabase Installation Guide
for details.
You may need to shut down and restart your XP SERVER after copying the
shared library to the sybase/lib directory.
2. Ensure that the procedures are not already defined in the master database:
isql -Usa -Ppassword
1> sp_dropextendedproc notify
2> go
1> sp_dropextendedproc notifytable
2> go
1> sp_freedll "adbalerter_sybase"
2> go
You may need to shutdown and restart your XP SERVER after copying
adbalerter_sybase.dll to the \Sybase\dll directory.
2. Ensure that the procedures are not already defined in the master database:
isql -Usa -Ppassword
1> sp_dropextendedproc notify
2> go
1> sp_dropextendedproc notifytable
2> go
1> sp_freedll "adbalerter_sybase"
2> go
4. Set access permissions for the database account used by the adapter:
1> grant execute on notify to database_account
2> go
1> grant execute on notifytable to database_account
2> go
1> exit
You can also execute the notify procedure for more than one adapter
instance. Each configuration name must be separated using a space character.
For example:
1> execute itaska.master.dbo.notify @agentname='agentone
agenttwo agentthree'
2> go
The notifytable procedure can be invoked for one or more adapter instances
and one publishing table. For example:
1> execute itaska.master.dbo.notifytable
@agentname='agentone agenttwo',@tablename='P_ORDER_TABLE'
2> go
If the database used by the adapter and master database are on the same
database server, the server prefix need not be given.
This chapter explains the request-response service, load balancing, and Oracle
REF data type support features.
See the TIBCO Adapter for ActiveDatabase Examples guide for request-response
exercises.
Topics
Introduction
Multiple adapter instances can be configured so that any one of the configurations
receives and processes the request:
• For a single configuration, the number of threads can be configured that will
be responsible for processing application requests. See Load Balancing in a
Single Configuration on page 164 for details.
• For multiple configurations, TIBCO Rendezvous Distributed Queuing can be
used to balance the load across a number of configurations in a queue. The
task will be assigned to the least loaded member of the queue. See Load
Balancing Across Configurations on page 166 for details.
The following procedure is the same as above, but uses single quotes. It will be
correctly processed.
select @qry = 'Update ' + @tablename + ' set ORDER_DESCRIPTION =
''UPDATE TEST'', ORDER_PRICE = 10109.25'
See Delimited Identifiers in your Microsoft SQL Server documentation for details.
Request-Response Mode
Requests
A request can contain one or more SQL statements, stored procedures, or both to
be executed as a transaction. The text of the SQL statement follows the
conventions for ODBC SQL syntax. All SQL statements supported by the DBMS
are allowed and placeholders (represented by a question mark, ‘?’) are permitted
in the SQL statement, conforming to the ODBC rules. For performance reasons, it
is recommended to use a SQL statement. The ‘?’convention should only be used
to bind binary data or call stored procedures.
An adapter instance is configured for request-response activity as described in
Request-Response Service Tabs on page 91. In so doing, the adapter listens on the
subject on which the application sends requests. The application uses TIBCO
Rendezvous or the TIBCO Adapter SDK to send a self-describing message
containing a request on the agreed subject to the adapter instance.
The following are supported:
• DDL and DML SQL statements
• Multiple statements or procedures in a single transaction that send a nested
TIBCO Rendezvous message
• rv_Send(), rv_SendWithReply() and rv_Rpc() calls
• TIBCO Rendezvous C, C++, and Java APIs
Responses
A response from the adapter to a client application has a result code and one or
more result sets. Each result set contains nested self-describing messages, each of
which encodes a result row, such as that returned from a query. A response can
also return an error code and error description if the request was not successful.
Responses are described in the following sections:
• TIBCO ActiveEnterprise or XML Message Response Format, page 150
• TIBCO Rendezvous Message Response Format, page 150
The closure field is an optional field. If included in the request, the response
returns the same closure argument untouched, so the client application can use
this information as a means of matching requests with responses.
The value Statement is a TIBCO Rendezvous Message of the following structure:
Statement
{
rv_Name = “sql”, rvmsg_Type = RVMSG_STRING, rvmsg_Data =
SQL_statement_with_possible_bind_variables
rv_Name = “maxrows”, rvmsg_Type = RVMSG_INT, rvmsg_Data =
Optional_max_number_of_rows_to_fetch
rv_Name = “bind”, rvmsg_Type = RVMSG_RVMSG, rvmsg_Data = Bind_data
rv_Name = “bind”, rvmsg_Type = RVMSG_RVMSG, rvmsg_Data = Bind_data
rv_Name = “bind”, rvmsg_Type = RVMSG_RVMSG, rvmsg_Data = Bind_data
. . .
}
The value Bind_data is a TIBCO Rendezvous Message with the following structure:
Bind_data
{
rv_Name = "position", rvmsg_Type = RVMSG_INT, rvmsg_Data =
position_of_placeholder_starting_with_1_from_left_to_right
rv_Name = "column", rvmsg_Type = RVMSG_STRING, rvmsg_Data =
in_format_table-name.column-name_whose_column_type_matches_this_bound_variable
rv_Name = "data", rvmsg_Type = type_of_bound_data, rvmsg_Data = value_of_bound_data
}
To create a bind parameter for binary data, the actual data would be sent as an
RVMSG_OPAQUE.
Not every data value sent to an SQL statement must be bound. The client can
embed all these values into the actual text of the statement instead. Embedding
the values directly into the SQL text results in better performance. However,
binary values must be bound. Types such as adbDateTime can either be bound or
included in the SQL text by using the native DBMS date conversion function.
For example, in ORACLE, you could use the TO-DATE function to enter a date:
INSERT INTO order_table (order_id, order_date) values (2,
TO_DATE(’1999-08-20 10:20:01’, ’YYYY-MM-DD HH24:MI:SS’));
Reply
{
rv_Name = “status” rvmsg_Type = RVMSG_INT rvmsg_Data = 0
rv_Name = “results” rvmsg_Type = RVMSG_RVMSG rvmsg_Data = Result
rv_Name = “closure”, rvmsg_Type = RVMSG_OPAQUE, rvmsg_Data =
optional_closure_data
}
Result
{
name = “row” type = RVMSG_RVMSG value = List_of_columns
name = “row” type = RVMSG_RVMSG value = List_of_columns
name = “row” type = RVMSG_RVMSG value = List_of_columns
. . .
}
List_of_columns
{
rv_Name = column_name, rvmsg_Type = type_of_bound_data, rvmsg_Data =
value_of_bound_data
If the request processing was not successful, the response could also return an
error code and error description as shown next:
Reply
{
rv_Name = “status” rvmsg_Type = RVMSG_INT rvmsg_Data = nonzero_number
rv_Name = “sql” rvmsg_Type = RVMSG_STRING rvmsg_Data = SQL_statement_that_caused_error
rv_Name = “error” rvmsg_Type = RVMSG_STRING rvmsg_Data = error_text
rv_Name = “closure”, rvmsg_Type = RVMSG_OPAQUE, rvmsg_Data = optional_closure_data
}
The status value is an integer specifying success or error. Possible values are:
0: ok // No error
1: noMem // Out of Memory
2: notInitialized // Object never initialized
3: typeConversion // Type conversion error
4: dbNotFound // Database not registered
5: serverError // Error reported by server
6: serverMessage // Message from server
7: vendorLib // Error in vendor's library
8: notConnected // Lost connection
9: endOfFetch // End of fetch
10: invalidUsage // invalid usage of object
11: columnNotFound // Column does not exist
12: invalidPosition // invalid positioning within
object,i.e.bounds err
13: notSupported // Unsupported feature
14: nullReference // Null reference parameter
15: notFound // Database Object not found
16: missing // Required piece of information is missing
17: noMultiReaders // This object cannot support multiple readers
18: noDeleter // This object cannot support deletions
19: noInserter // This object cannot support insertions
20: noUpdater // This object cannot support updates
21: noReader // This object cannot support readers
22: noIndex // This object cannot support indices
23: noDrop // This object cannot be dropped
24: wrongConnection // Incorrect connection was supplied
25: noPrivilege // This object cannot support privileges
26: noCursor // This object cannot support cursors
27: cantOpen // Unable to open
28: applicationError // For errors produced at the application
level
29: notReady // For future use
Query Example
As an example, assume the SQL statement, SELECT * FROM ORDER_TABLE
produces the following result:
SQL> SELECT * FROM ORDER_TABLE;
{
name = “closure” value = optional_closure_argument
name = “status” value = 0
name = “results” value =
{
name = “row” value =
{
name = “order_id” type = RVMSG_INT value = 1
name = “order_description” type = RVMSG_STRING value = “Order 1”
name = “order_price” type = RVMSG_REAL value = 1.00
}
name = “row” value =
{
name = “order_id” type = RVMSG_INT value = 2
name = “order_description” type = RVMSG_STRING value = “Order 2”
name = “order_price” type = RVMSG_REAL value = 2.00
}
}
}
Error Example
If the request that was processed resulted in an error, the adapter returns a
message containing an error code and description as shown below. In this
example, assume the SQL statement SELECT * FROM ORDER_TABLE produced an
error because there was no table named ORDER_TABLE defined in the database:
SQL> SELECT * FROM ORDER_TABLE;
SELECT * FROM ORDER_TABLE
*
ERROR at line 1:
ORA-00942: table or view does not exist
The self-describing message produced by the adapter would have the following
structure:
{
name = “closure” value = optional_closure_argument
name = “status” value = 5
name = “sql” value = “SELECT * FROM ORDER_TABLE”
name = "error" value = "[INTERSOLV][ODBC SequeLink
driver][DB2/400]ORDER_TABLE in *LIBL type *FILE not found.
}
RPC Mode
TIBCO Adapter for ActiveDatabase uses the TIBCO Adapter SDK Operations API
for RPCServer.
In TIBCO Designer, you can configure an adapter to act as an RPC (remote
procedure call) server on behalf of a client. Selecting RPC mode creates an object
in the repository describing the RPC server that the adapter instance will start.
This section presents the structure of the TIBCO Repository class objects that
provide MOperation support. Based on these class descriptions, you can create an
RPC client to send requests to the adapter in the expected structure.
For convenience, class structure is shown in XML format.
Schema Types
Two schema types can be used for the server object created in the repository. For
Standard RPC Operation, the standard request and reply object schema are
pre-defined by TIBCO Adapter for ActiveDatabase. This schema can be used to
describe the input and output of any database request, allowing a
request/response service to process database operations on any tables or execute
any stored procedures.
In some cases, using a standard schema can make the request/reply service
difficult to integrate with third-party applications, as standard request and reply
object schema do not describe the actual input and output values of a database
operation or a stored procedure. The third-party application has to do its own
parsing and mapping of the request and reply objects. The Custom RPC Operation,
which allows you to define your operations, can be used in these situations. You
can specify the stored procedure to be executed at design time. These operation
definitions are stored in the repository in a way that allows easy integration with
other applications.
The SQL_OPS class describes the operations that the adapter instance, acting as an
RPC server, can handle.
The structure of the server object is:
<servers>
<rvCmRpcServer
name = "agentNamereqreprvcmRPCServer"
session = "agentNamepubreqreprvcmRvCmSession"
subject = "ADB.SDK.OPERATION"
classRef = "SQL_OPS"
/>
</servers>
SQL_OPS Class
The structure of the SQL_OPS class is:
<class
name = "SQL_OPS">
<operation
name = "SQL_EXECUTE"
returnClass = "SQL_RETURN">
<parameter name = "STATEMENT" classRef = "SQL_STATEMENT"
direction = "in"> </parameter>
</operation>
<operation
name = "SQL_BATCHEXECUTE"
returnClass = "SQL_BATCHRETURN">
<parameter name = "STATEMENTS" classRef =
"sequence[SQL_STATEMENT]"
direction = "in" />
</operation>
</class>
SQL_RESULTSET Class
The structure of the SQL_RESULTSET class is:
SQL_ROW Class
The structure of the SQL_ROW class is:
SQL_RETURN Class
The structure of the SQL_RETURN class is:
SQL_RETURNVALUE
SQL_BIND Class
The structure of the SQL_BIND class is:
SQL_STATEMENT Class
The structure of the SQL_STATEMENT class is:
CLOSURE Any Closure argument. The reply returns this closure argument
untouched.
Data Type or
Output Item Classname Description
OPTIONS CUSTOM_OP_OUTPUT_ Contains the error description and the SQL statement
OPTION
if an error occurred.
Resultset Support
TIBCO Adapter for ActiveDatabase supports multiple resultsets returned for a
stored procedure. The class generated for the resultset output depends on the
schema information provided by the JDBC driver.
• For drivers that return valid information of a resultset schema, ADB creates an
output class, named OUTPUT_ROW[1..n], for each result set. This is shown in
the screen below.
• If a driver does not return valid information for the resultset schema, TIBCO
Adapter for ActiveDatabase uses the generic class SQL_RESULTSETS as the
output schema, as described in Standard RPC Operation on page 155.
DataDirect JDBC 3.3 drivers only provide valid resultset schema information for
Oracle Server version 8.1.7 or higher.
3. Click Apply.
4. In the project tree panel, expand the GenericAdapterConfiguration icon
and click the Adapter Services folder.
5. Drag a Request-Response Invocation Service icon to the designer panel.
6. In the Configuration tab, set the name of the service and transport type of
your client service.
7. In the Transport tab, set the message subject, quality of service, and wire
format of your client service.
If using the TIBCO Rendezvous message transport, you must use the TIBCO
ActiveEnterprise wire format.
8. In the Schema tab, set the classReference to point to the correct class
schema.
— For a standard RPC schema, use the following class schema:
AESchemas/ae/ADB/adbmetadata/Classes/SQL_OPS
— For custom RPC schema, use the class schema that corresponds to the
server endpoint:
AESchemas/ae/ADB/serviceName/Classes/ADBServer_OPS
9. Click Apply.
Load Balancing
The adapter balances the load of requests coming in from applications in two
ways, within a single adapter instance and across multiple adapter instances.
While the request message can be sent with either reliable or certified quality of
service, the response message is always sent back using the reliable quality of
service.
Distributed Queue
Request Adapter 4
Request Adapter 3
Request Adapter 2
Adapter 1
(Scheduler)
Responses
Request
TIBCO Messaging
Application
The configurations have been set up to use distributed queueing with one
configuration acting as the scheduler. Only one of the three configurations will
receive an incoming request from an application. The scheduler will assign
certified requests to the least loaded member of the queue.
The adapter supports the use of the REF data type as an OUT parameter in an
Oracle stored procedure. The adapter returns a result in the same way as it does a
result set from a SELECT query. The exact usage depends on the driver used
(DataDirect Connect or Oracle ODBC), as described below.
For example, consider the following PL/SQL procedure:
-- Create a REF cursor procedure
CREATE OR REPLACE PACKAGE ORDER_DEMO AS
TYPE OrderCurTyp IS REF CURSOR RETURN SUB_ORDER%ROWTYPE;
PROCEDURE FindOrders (price IN NUMBER, order_cv OUT
OrderCurTyp);
END ORDER_DEMO;
The REF cursor's data will be returned in the results section of the reply.
Also, ProcedureRetResults=1 must be added to the data source entry in the
odbc.ini file.
The REF cursor's data will be returned in the results section of the reply.
This chapter describes advanced features such as the format of a publishing table,
stored procedures and the triggers used to populate publishing tables and
adapter instance options.
Topics
Publishing Table
Publishing tables mirror tables that you have identified for monitoring. They
contain additional columns, primarily a sequence number and delivery status,
which are needed by the adapter to detect new rows. You create a publishing table
for each table you want to activate using TIBCO Designer.
In addition to a copy of the source table’s columns, the publishing table has the
following additional columns.
The publication table cannot contain any user-created columns where the column
name starts with ADB_. These characters are reserved for adapter use.
• The generated trigger invokes the stored procedure for each row inserted into
the source table.
If the trigger on a subscription table fails, the insert, delete or update will also fail
and the transaction will be rolled back.
Publication Example
The following is a listing of the SQL commands used to create a publication. The
listing can be found in the demo\demo1\demo_database.sql file. The file shows the
stored procedure, and insert, update and delete triggers that are generated for a
publication.
-- *******************************************
-- TIBCO Adapter for ActiveDatabase
-- Demo SQL script
-- *******************************************
-- *******************************************
-- Create sample tables
-- *******************************************
-- *******************************************
-- Setup a publication
-- *******************************************
ADB_SEQUENCE)
/
-- *******************************************
-- Setup a subscription
-- *******************************************
-- *******************************************
COMMIT;
Source Table
If loop detection is enabled, the following column will be added to the source
table. Loop detection is explained in Loop Detection on page 11.
The source table cannot contain any user-created columns where the column
name starts with ADB_. These characters are reserved for adapter use.
Exception Table
ADB_ERROR_TEXT VARCHAR2 (2000) Text of the error from the database server, ODBC
driver, or other source that caused the exception.
The exception table cannot contain any user-created columns where the column
name starts with ADB_. These characters are reserved for adapter use.
RVMSG_INT 4 ADB_OPCODE 4
RVMSG_REAL 8 A 1
RVMSG_STRING 2 B "a"
RVMSG_REAL 8 C 4
}
RVMSG_RVMSG 58 ^2^
{
RVMSG_STRING 8 ^class^ "S_KEYP3"
RVMSG_INT 4 ADB_OPCODE 3
RVMSG_REAL 8 A 1
RVMSG_STRING 2 B "a"
RVMSG_REAL 8 C 4
}
}
}
RVMSG_RVMSG 210 ^2^
{
RVMSG_STRING 8 ^class^ "S_KEYP2"
RVMSG_INT 4 ADB_OPCODE 1
RVMSG_REAL 8 A 2
RVMSG_STRING 2 B "a"
RVMSG_REAL 8 C 4
RVMSG_RVMSG 119 ADB_SEQUENCE_S_KEYP3
{
RVMSG_STRING 18 ^class^ "sequence[S_KEYP3]"
RVMSG_INT 4 ^idx^ 1
RVMSG_RVMSG 58 ^1^
{
RVMSG_STRING 8 ^class^ "S_KEYP3"
RVMSG_REAL 8 A 2
RVMSG_STRING 2 B "a"
RVMSG_REAL 8 C 4
}
}
}
}
}
}
When the adapter receives this message, it performs the following database
operations in sequence:
1. Bypass the parent table operation
2. Bypass first row operation on child table S_KEYP2
3. UPDATE S_KEYP3 set B = 'a', C = 4 where A = 1;
4. DELETE FROM S_KEYP3 where A = 1;
5. INSERT INTO S_KEYP2 (A, B, C) values (2, 'a', 4);
6. INSERT INTO S_KEYP3 (A, B, C) values (2, 'a', 4);
Database Types
Oracle
The following Oracle data types are supported:
• CHAR • TIMESTAMP
• DATE • RAW
• LONG • VARCHAR2
• LONG RAW • CLOB
• NUMBER • BLOB
SQL Server
The following SQL Server data types are supported:
Sybase
The following Sybase data types are supported:
DB2
The following DB2 AS400 data types are supported:
• CHARACTER • NUMERIC
• DECIMAL • REAL
• DOUBLE PRECISION • SMALLINT
• FLOAT • TIMESTAMP
• INTEGER • VARCHAR
• LONG VARGRAPHIC
TIBCO
ODBC Type ActiveEnterprise TIBCO Rendezvous
Message Type
Type
SQL_CHAR string RVMSG_STRING
SQL_VARCHAR
SQL_LONGVARCHAR
SQL_SMALLINT i4 RVMSG_INT
SQL_INTEGER
SQL_REAL r8 RVMSG_REAL
SQL_DOUBLE
SQL_FLOAT
SQL_DECIMAL
SQL_NUMERIC
Subject Names
where COLUMN1 and COLUMN2 are names of columns in the publishing table. For
example:
TIBCO.ORDER.$ORDER_ID.$ORDER_DESCRIPTION
and the following values are inserted into the ORDER_DESCRIPTION table:
insert into ORDER_TABLE values(112,'>',99.91);
You can add one or more certified subscribers, or listeners, for a publisher adapter
that sends messages on subjects using the RVCM quality of service. The name of
the subscriber is added to the publisher adapter’s preregistered list. The
subscriber can be a TIBCO Adapter for ActiveDatabase subscriber, or any other
TIBCO Rendezvous subscriber.
A subscriber adapter on the preregister list is certified to receive all messages sent
on the specified subject using the RVCM quality of service. If a subscriber is not
preregistered, it may miss one or more of the initial messages sent by the
publisher adapter.
Wildcard TIBCO Rendezvous subject names are not supported for preregistered
listeners.
3. Verify the name of the certified subscriber in the Preregistered Listeners field:
%%Domain%%.%%Deployment%%.adb.%%Adapter_name%%.CM. In this example,
the preregistered listener is the subscriber adapter named rvsub.
4. Click Apply.
The ledger file provides temporary storage for published messages that are sent
by a publisher adapter using the TIBCO Rendezvous certified messaging quality
of service. Each message is held in the ledger until an acknowledgement is
received from the subscriber that the message has been consumed. If there are
many subscribers, the ledger file can grow to a substantial size. In this case, it
might be preferable to store the ledger file in a directory other than the default
directory (which is install-path/ledger).
To change the location of the ledger file in TIBCO Designer:
1. In the project tree panel, navigate to the open the Advanced>Sessions>
adbadapterInstanceNamervcmRvCmSession object, as shown in the previous
section, Preregistering a Certified Subscriber.
2. Edit the Ledger File value to point to the new ledger file location.
In the following example the name of the ledger file has been changed to
adbdemo2pubrvcm.ldg, and it will be generated in the directory in which you
run the adapter instance.
When the adapter instance is restarted, it writes the ledger file to the new location.
For more information on using TIBCO Designer, see the TIBCO Designer User’s
Guide.
adbDateTime Object
Do not change any adbDateTime object information in this screen. Use this
information to determine how to format the third-party subscriber date value.
When source data is stored in a view or other database object, you can publish
this data using the publish by reference object feature. Publishing by reference
object is an extension of the publish by reference feature. For a description of
publishing by reference, see Publish by Reference on page 15.
In both cases, only key values from the source table are stored in the publishing
table. The difference when publishing by reference object is when a row changes
in the source table and the associated trigger fires, the adapter fetches data from
the reference object, rather than the source table. The name of the reference object
is stored in an ADB_REF_OBJECT column in the publishing table. For a
description of this column, see Publishing Table on page 170. Publishing by
reference object is recommended when a view provides the most efficient access
to source data, for example when many levels of nesting exist between a parent
and child table.
Publishing Table — Type the table name to use for storage. A common
practice is to use the source table name prefixed by P_.
Referred Object — Type the name of the view or other database object to
select source data from. To select from a list of tables in the current user
schema, click Add. To select an object from a different schema, select Add
From.
Update Mode — Select the method for updating tables from the drop-down
list. Choose Update to update a row in the destination table only if the row
exists. Choose Upsert to update a row in the destination table if the row exists
and, if no such row exists, perform an insert.
5. Click Apply.
2. In the Configuration tab, click the Key Field checkbox to select it.
3. Click Apply.
Adding a Sequence
To add a sequence:
1. In the TIBCO Designer project tree panel, navigate to
AESchemas\ae\Classes\ae\ADB\adapter_instance\Classes\reference_object.
2. Drag a Generic Sequence icon from the palette panel to the design panel to
add it to the reference object class. The TIBCO Designer window should look
similar to the following:
4. In the Select Sequence field, click Browse. The Select Resource dialog
displays:
5. Click the name of the sequence that represents the child table for the
publication service, for example, sequence[ORDER_DETAILS].
6. Click OK.
7. In TIBCO Designer, click Apply. The sequence is added to the metadata for
the reference object.
Adding an Association
To add an association:
1. In the TIBCO Designer project tree panel, navigate to
AESchemas\ae\ADB\adapter_instance_name\Associations.
Several associations could display, at least one for the parent table to the child
table on the publisher side, and another for the destination parent table to the
child table on the subscriber side.
2. Click each of the resource icons that represent the parent-child relationship on
the publisher side. For example:
3. In the Configuration tab, click in the Name field and replace the name of the
publishing table with the name of the reference object. For example,
P_CUSTOMER^ORDER_DETAILS becomes ORDER_VIEW^ORDER_DETAILS.
4. Click Apply.
5. In the project tree panel, double-click the new association name to expand it.
7. Enter a Role Name value that contains the reference object name. For example,
roleORDER_TABLE.
8. In the Endpoint Class field, click Browse. Navigate to the class that
represents the reference object, in this case ORDER_TABLE, and click OK.
Example
In the following example, the publisher adapter is configured to publish source
data from the CUSTOMER table and its child table, EXTERNAL_ORDER_DETAILS. The
relevant key columns are CUST_ID and ORDER_ID.
The publishing table is created with necessary adapter fields, as well as CUST_ID
and ORDER_ID fields. When a row in CUSTOMER is modified, the trigger fires,
populating fields and copying the CUST_ID and ORDER_ID values, as well as the
name of the reference object, ORDER_VIEW, to the publishing table. When the
adapter polls the publishing table, it detects the new row. The adapter then selects
the order and customer data from ORDER_VIEW, using the CUST_ID and ORDER_ID
values along with the view name found in the publishing table. Then the message
is published.
The user callout shared library allows the transformation of a message that the
adapter publishes into a structure that you want to be published. The shared
library can be customized to apply limited transformations to outgoing and
incoming messages.
To use the callout library, the TIBCO Adapter SDK must be installed because the
callout library uses SDK include files and links with SDK libraries. Additionally,
you must use the same TIBCO Adapter SDK version that your adapter instance is
using.
If a message is modified before it is sent by a publisher adapter, all subscribers
will receive the modified message. If a message is modified before it is received by
a subscriber adapter, only that adapter will get the modified message.
For example, at the publisher adapter, a message can be modified to have a field
added, or publish an empty message if a certain criteria is met. At the subscriber
adapter a message can be modified to be written to the database or not, based on a
filter, or have the subject name inserted into the table.
Before a message is sent or received, the adapter checks the callout library. If the
callout library has not been modified, the message is passed back to the adapter
unchanged. If the callout library has been modified, the message is passed back to
the adapter with the modification. After receiving a modified message from the
callout library, the adapter instance sends or consumes the message like any other
message.
• The altermsg.cpp source file must be edited with your custom code.
• The callout library must be rebuilt for your platform.
The source code is included in your installation media in the
install-path\demo\altermsg directory.
If you send or receive messages in the TIBCO Rendezvous Message wire format,
the TIBCO Rendezvous Message APIs cannot be used to directly alter those
messages. Instead, you will receive an MTree to which various functions can be
applied to view or traverse the TIBCO Rendezvous message. If you must change
the message, create a new message and pass it back to the adapter using the
newmsg argument.
alterMsgSub(char * subj,
const MTree *msg,
MTree **newmsg,
MInstance *pInst,
MApp *pMapp,
MMessageFormat dataformat);
Both functions share the same set of parameters. However, several parameters are
specific to a particular wire format. The following table contains parameter
descriptions and a column for each format. If the R column contains an X, use the
parameter for TIBCO Rendezvous Message wire format. If the M column contains
an X, use the parameter for TIBCO ActiveEnterprise Message wire format.
Otherwise, leave the value as NULL.
Parameter R M Description
subj X X Subject on which the message is sent or
received.
Parameter R M Description
pInst X MInstance of the message. Alter directly if
necessary.
AIX 5.1 XLC_r v5.1.0 (You must use the xlC_r compiler)
2. Using a text editor open the MakeFile and set the SDK_Home environment
variable. For example:
SDK_HOME=/local/activedb/sdk50
Within each adapter instance, the adapter typically creates multiple database
connections or sessions. Each connection has a different responsibility (such as
selecting from the publishing table or inserting into the destination table) and
each is identified using a unique connection identifier.
The unique identifier added to each session allows a database administrator to
monitor the adapter’s database activity from Oracle by being able to identify
what each database connection is doing. The Oracle DBA can query the
CLIENT_INFO column of V$SESSION to identify each Oracle connection the
adapter is using. The identifiers for each service are:
• InstanceId.ADBPubPolling (publication service polling connection)
• InstanceId.ADBPubUpdate (publication service update connection)
• InstanceId.ADBPubConfirm (publication service confirm connection)
• InstanceId.ADBSubscriber (subscription service connection)
• InstanceId.ADBRequestReply.n (request-response service connection
where n is the thread ID)
Make sure that the application program that is accessing the source table is
running with commitment control enabled. Otherwise, the trigger program
will encounter a runtime error with this keyword.
3. After editing the trigger program member, save and compile it with options
DFTACTGRP(*NO) and ACTGRP(*CALLER). These options ensure that the
trigger program runs as part of the calling application program's commitment
cycle. The trigger program will run in the application program's activation
group. Any database updates done by the trigger program will be done or
undone by a Commit or Rollback issued by the application program, thus
ensuring database integrity.
4. To have the trigger program run under commitment control, the publishing
table (listed in the trigger program) must be journalized. This can be done by
using the AS/400 command STRJRNPF. The journal that is being used to log
changes to the source table can be used for the publishing table as well.
When the project is saved and a revision control system has been specified, the
adapter displays a warning that additional files were created and should be
added to the revision control system. This warning appears only when the files
are created for the first time. The warning displays a Go To Resource button that
helps in navigating to the resource. You should use the Multi-User>Add
Resources to RCS menu command to add these files to the revision control
system.
For information about how to use the Multi-User feature in TIBCO Designer, refer
to the TIBCO Designer User’s Guide.
By default all error, warning and information messages are printed in the console
window in which the configuration was started and to a default log file. The log
file can be located anywhere on your file system.
TIBCO Adapter for ActiveDatabase will trace to whatever sink is present in your
TIBCO Adapter for ActiveDatabase configuration. If you have the default sinks of
stdioSink and fileSink, TIBCO Adapter for ActiveDatabase will write to both
the file and stdout.
Only errors that originate in the adapter instance itself are logged in the log file.
Errors from other sources, for example TIBCO Rendezvous APIs or TIBCO
Adapter SDK APIs, are not logged to a log file, but are printed to the console
window where the configuration started.
The Log to Standard I/O checkbox is selected so that trace information can be
written to the console window where the adapter instance was started. The log
file is generated in the start directory unless specified otherwise in the properties
file.
To disable file tracing for the adapter instance, delete this file name and click
Apply.
The following checkboxes control the level of trace information that is captured:
• Log Info Messages—Capture error and warning information.
• Log Debug Messages—Capture all available information.
• Log Warning Messages—Capture warning information only.
• Log Error Messages—Capture error information only.
With these default settings, the adapter instance overwrites the oldest file after 3
files have been created and the last file reaches 3 KB. For instructions on changing
the default settings, see the next section.
File Count
Specifies the maximum number of log files that are created for this adapter
instance.
Append Mode
When this box is checked (the default), information is written to the log file in the
Append mode, where trace information is appended to existing entries in the file.
Unchecking this box changes to Overwrite mode, where the adapter instance
overwrites the current log file the next time the adapter starts.
If the scripts created for legitimate database changes are generated successfully
but an error occurs while these changes are being saved to the database, a
message such as the following sample may display.
Topics
Overview
Oracle DB Oracle DB in
in Shift-JIS EUC-JP
ActiveDatabase ActiveDatabase
Publishing Service Subscription Service
UTF-8 UTF-8
TIBCO Messaging
In circumstances where only ASCII and Latin-1 data (including English and
Western European languages) are exchanged in the system, you can use Latin-1
encoding as the TIBCO Messaging encoding between TIBCO ActiveEnterprise
components. It is not necessary to use UTF-8 as the TIBCO Messaging encoding in
this case. UTF-8 is only required when the data to be exchanged is not included in
the Latin-1 character set, as is the case with Asian languages and other European
languages.
To configure the adapter to work correctly in transmitting non-ASCII data, you
must set the TIBCO messaging encoding property. The following sections explain
how to do this.
The services do not use TIBCO Messaging encoding to connect to the backend
database. See Configuring the Adapter to Communicate with the Database on
page 224 for more information.
There are currently two choices for TIBCO Messaging encoding: Latin-1
(ISO8859-1) for transmitting ASCII and Latin-1 data, and UTF-8 for transmitting
data of other languages.
The encoding property is set on the project itself at design-time, and in the TIBCO
administration server’s property file when creating a TIBCO administration
domain.
The encoding value is set on the root project folder in TIBCO Designer. By default,
the value is set to ISO8859-1. You can change the value by selecting the folder
and under the Project Settings tab, changing the value for the TIBCO Message
Encoding field.
In order for different TIBCO components that each have their own local file
repository to communicate with each other without data garbled, they must use
the same TIBCO Messaging encoding, meaning that all these components must
set their local project encoding to the same value.
The encoding property of a local project file is only for determining the TIBCO
Messaging encoding, not the encoding used for the persistent storage of the
project files. The project files are always saved as UTF-8 encoded files.
The TIBCO message encoding is a project setting used for data conversion among
different components. However, the adapter uses a different encoding value for
exchanging data with the database. Because there are many intermediate entities
between the adapter and the database (such as the ODBC driver manager, ODBC
driver, and possibly the database native client), and each of these entities may
conduct encoding conversions to the data stream flow between the service and
the database, the data encoding from the database might not be known, while the
data encoding to the database must be compatible to that of the database.
To eliminate the complexity introduced by these intermediate entities, you can
make some configuration changes that ensure the service’s encoding setting are
compatible with the database instance's encoding. This also boosts the
performance by eliminating unnecessary intermediate data conversions.
The configuration changes differ depending on the operating system that the
service is running on, the database vendor, the ODBC driver used, and other
factors. The following sections explain how to configure the adapter to
communicate with the database.
You must select or enter a valid encoding that the adapter understands. The
adapter assumes the data coming from the database is in this encoding and
ensures that data sent to the database is in this encoding. The encoding given
here should match the encoding set for the database to which the adapter
connects.
There are two ways to do this configuration:
— In TIBCO Designer, set this in the adapter resource. In the Configuration
tab, click Show All Tabs. In the General tab, choose the encoding that is
compatible with the encoding of the database instance to be connected to.
Refer to Table 21, TIBCO ActiveDatabase Adapter and Oracle NLS_Lang
Values.
The adapter may support more encoding values than those shown in
TIBCO Designer. You can type in these encoding values. For more
information about these, refer to Appendix B in TIBCO Adapter Concepts.
— You can modify the adapter encoding property, adb.encoding, in the
adapter’s.tra file. This setting supersedes the encoding option chosen in
TIBCO Designer.
4. Set the ODBC DSN in TIBCO Designer
This field is set under the adapter’s Run-time Connection tab. You must also
define the ODBC DSN on the machine on which the adapter is running.
— On Unix systems, modify the odbc.ini file
<install-path>/tibco/adapter/adadb/5.1/odbc. In addition, you must set
the correct IANAAppCodePage to match the database encoding, if you are
using a wire protocol driver. See IANAAppCodePage on page 225 for a list
of IANAAppCodePage values. The complete list is available in
<install-path>/tibco/adapter/adadb/5.1/odbc/books/odbcref/odbcre
f.pdf
Table 20 IANAAppCodePage
17 Shift_JIS (Japanese)
Table 20 IANAAppCodePage
38 EUC_KR (Korean)
When using the DataDirect non-wire protocol ODBC driver and UTF-8 as the
adapter encoding to support multilingual data exchange, the configuration is
totally different. Please refer to the section Special Configurations for Supporting
a UTF-8 Database.
This forces the adapter to use binary mode to communicate with the database.
These are for the internationalization configuration, which forces the adapter to
use binary mode to communicate to the database instance. No further encoding
related configurations are necessary. For example, on UNIX there is no need to set
the AppCodePage attribute, and when using a non-wire driver there is no need to
set the proprietary database client.
For the Oracle database, make sure the installed NLS_LANG attribute’s value
matches the database character set. If not, set NLS_LANG to the correct value
before starting the adapter. See TIBCO ActiveDatabase Adapter and Oracle
NLS_Lang Values on page 229 for a list of values.
Read this appendix if you have installed TIBCO Hawk and want to use TIBCO
Hawk microagents through the Monitoring tab of an adapter instance. TIBCO
Hawk is an optional tool from TIBCO Software Inc. that can be used in addition to
the standard trace message logging method described under Logging Tab on
page 58).
Topics
Overview
The TIBCO Hawk agent can be configured to start automatically during the
system boot cycle. See the TIBCO Hawk Installation and Configuration guide for
information about starting TIBCO Hawk.
The TIBCO Hawk Administrator’s Guide explains how to start the TIBCO Hawk
Display.
The guides are included in your TIBCO Hawk software installation area.
This dialog has two modes, Invoke and Subscribe. Invoking a method
immediately returns a single set of current results. Subscribing provides
updates of current results at regular intervals. Radio buttons at the bottom of
the dialog control these modes.
2. Click a microagent name, such as Self, to display a list of associated methods
and text descriptions in the panels below.
If the method accepts arguments, fields for each argument display in the
upper right panel. Detailed help text displays in the lower panel.
4. Specify any arguments for the method invocation.
5. Verify that the Invoke radio button is selected.
Available Microagents
Each adapter has two microagents, a standard TIBCO Hawk microagent named
COM.TIBCO.ADAPTER.xyz (where xyz is the adapter configuration name) and a
custom microagent. These microagents provide:
• Business level statistics—statistics that report the progress of the adapter as it
interacts with the database. For example, in a database adapter such statistics
might indicate whether objects were successfully or unsuccessfully inserted,
updated, or deleted in the database.
• Queries that return information about the state of the adapter. This can be an
important tool for seeing the internals of an adapter and debugging it if
something appears wrong. For example, methods can return information
about threads, internal queues, or connections to the target system. Using
these methods, one might be able to identify certain bottlenecks or gauge how
successfully an adapter is scaling with respect to the current environment.
• Updates of the adapter runtime parameters. This includes retrieving the
current runtime parameters and setting new runtime parameters without
restarting the adapter. An example of this is getting and setting the polling
interval. Updating a runtime parameter through the Hawk microagent only
affects the setting of the instance that is running. It does not make a
permanent change of the setting in either the repository or the .tra file.
The following table lists each method available for the adapter and page on which
the method is explained. Although the Microagents, Methods and Arguments
dialog in TIBCO Hawk Display lists more methods than are documented here,
only the following methods are supported.
getConnectionStatistics() Returns the state and statistics for all the 273
current connections used by the adapter.
activateTraceRole()
Purpose (Standard) Activates a mapping of a role to a sink at runtime. This replaces the
now-deprecated setTraceSink() TIBCO Hawk method.
deactivateTraceRole()
getAdapterServiceInformation()
Purpose (Standard) Returns information about the services implemented by this adapter.
The information is a summary of available adapter services.
getComponents()
Purpose (Standard) Returns information about the currently active TIBCO Hawk
components such as publishers, subscribers, or timers.
Component Type string The name of the TIBCO Adapter SDK class for
this TIBCO Hawk component, such as
MPublisher, MSubscriber, or
MIODescriptorSource. For more
information, see your TIBCO Adapter SDK
documentation.
getConfig()
getConfigProperties()
Purpose (Standard) Returns all attributes and elements for the given repository object.
getHostInformation()
getRvConfig()
Purpose (Standard) Returns information about the TIBCO Rendezvous session defined by
this adapter. Information about all currently defined sessions is returned if no
sessionName is provided.
Ledger File string Ledger file for this certified messaging session.
Returns the empty string for sessions that are
not certified messaging sessions.
getStatus()
New Errors integer Number of errors since the last call to this
method.
getTraceSinks()
Purpose (Standard) Returns information about sinks to which traces currently go.
Role Name string Name of the role for which you need information
for the specified sink or sinks. Default is all.
getVersion()
Purpose (Standard) Retrieves version information for the current application. Two lines
may be returned, one for the TIBCO Adapter SDK, one for the adapter.
_onUnsolictedMsg()
Purpose (Standard) Displays all alert messages sent from the adapter or an error if not
successful.
preRegisterListener()
reviewLedger()
Purpose (Standard) Returns information retrieved from the ledger file of a TIBCO
Rendezvous certified messaging session. Before invoking this method, ensure that
the certified messaging publisher adapter has established a certified delivery
agreement with its subscriber agents.
Returns
Last Sent Message integer Sequence number of the most recently sent message with this
subject name.
Total Messages string Total number of pending messages with this subject name.
Total Size integer Total storage (in bytes) occupied by all pending messages with this
subject name. If the ledger contains ten messages with this subject
name, then this field sums the storage space over all of them.
Listener Session string Within each listener submessage, the Listener Session Name field
Name contains the name of the delivery-tracking listener session.
Last Confirmed string Within each listener submessage, the Last Confirmed field contains
the sequence number of the last message for which this listener
session confirmed delivery.
Unacknowledged integer Number of RVCM messages pending for this listener. The value is
Messages computed by subtracting the last sent sequence number from the
last acknowledged sequence number.
setTraceSinks()
Purpose (Standard) Adds a role or changes the file limit of a previously specified sink.
Role Name string Name of the role you want to add to this sink
(warning, error, debug, or user defined). Default
is all.
stopApplicationInstance()
Purpose (Standard) Stops the specified adapter by calling the internal stop() method.
unRegisterListener()
Publisher Name string Name of the component for which the listener
should be preregistered.
getEventQueueSize()
Purpose (Custom) Retrieves the size of the TIBCO Rendezvous event queue for the
specified adapter instance. For more information on events and event queues, see
TIBCO Rendezvous Concepts.
setDebugLevel()
Purpose (Custom) Sets the debug level for the current adapter instance.
toggleVerboseFlag()
Purpose (Custom) Changes the value of the verbose flag from on to off, or the reverse.
showConfiguration()
Purpose (Custom) Shows the configuration defined for the current agent.
terminateADBagent()
Purpose (Custom) Stops the current TIBCO Adapter for ActiveDatabase agent.
Remarks Invoking this method displays a warning message with the text MicroAgent
returned error. AMI Method invocation timed out. The message can be
ignored.
getPollingInterval()
setPollingInterval()
Purpose (Custom) Set the polling interval for the publication service.
getPollingBatchSize()
Purpose (Custom) Get the polling batch size for the publication service.
setPollingBatchSize()
Purpose (Custom) Set the polling batch size for the publication service.
getActivityStatistics()
Purpose (Custom with adb.perfMon) Returns the total number of objects processed for all
the schemas, based on the request type. Also, returns the number of success and
error objects.
Failure integer The number of objects that were identified for this
schema but were not published because the
header of the schema failed validation for the
publication service, or was written to a file
because the schema was not associated with the
subscriber for a subscription service.
getActivityStatisticsByService
Purpose (Custom with adb.perfMon) Returns the total number of objects processed for
each of the schemas associated with the specified service. Also, returns the
number of success and error objects.
Schema Name string Name of the schema that is associated with the
service.
Failure integer The number of objects that were identified for this
schema but were not published because the
header of the schema failed validation for the
publication service, or was written to a file
because the schema was not associated with the
subscriber for a subscription service.
getActivityStatisticsByOperation()
Purpose (Custom with adb.perfMon) Returns the total number of objects processed for all
the schemas by each service that is associated with a specified operation. Also,
returns the number of success and error objects.
Failure integer The number of objects that were identified for this
schema but were not published because the
header of the schema failed validation for the
publication service, or was written to a file
because the schema was not associated with the
subscriber for a subscription service.
getThreadStatistics()
Purpose (Custom with adb.perfMon) Return the operation counts of the current threads.
getQueueStatistics()
Purpose (Custom with adb.perfMon) Return the current count of elements in any internal
queue used by the adapter. This includes the TIBCO Rendezvous event queues
automatically spawned by TIBCO Rendezvous for each adapter.
getConnectionStatistics()
Purpose (Custom with adb.perfMon) Returns the state and statistics for all the current
connections used by the adapter.
Connection Type string A type or key that will match this connection to
a thread or queue.
resetActivityStatistics()
Purpose (Custom with adb.perfMon) Resets all the counts for the activity statistics.
resetThreadStatistics()
Purpose (Custom with adb.perfMon) Resets all the counts for the thread statistics.
resetQueueStatistics()
Purpose (Custom with adb.perfMon) Resets all the counts for the queue statistics.
resetConnectionStatistics()
Purpose (Custom with adb.perfMon) Resets all the counts for the connection statistics.
Topics
General Questions
How should the adapter react if the database connection is lost and the database is later
restarted? Does it automatically try to reconnect?
If TIBCO Adapter for ActiveDatabase detects it has lost its database connection, it
shuts down. You can configure the adapter for automatic reconnection (see
Run-time Connection Tab on page 50). Alternatively, TIBCO Hawk rules can be
written to detect this and restart the adapter whenever this occurs.
Must an incoming message contain all the columns that are defined for the destination table?
The incoming message need not contain all the columns defined in the destination
database table. You can configure the adapter to expect only a subset of the
columns, defined in the repository. The adapter is driven from the subscribing
class description and will iterate through the attributes in the class definition for
the subscribing table and specifically look for those attributes in the incoming
messages. It inserts NULLs for the attributes that it is expecting but does not find
in the message. If there are more columns in the subscribing table than are listed
in the subscribing class (set when adding a subscription), those extra columns will
get whatever default values were specified during the table creation.
Does the TIBCO Rendezvous message that is published have to contain every field in the
publishing table?
Yes. You can control which fields are copied to the publishing table by configuring
the adapter and by changing the publication trigger to publish a subset of rows.
You can also append additional fields to a message or drop a message based on
some criteria using the user callout library. For more information on the user
callout library, see User Callout Library on page 200.
If multiple updates occur between polling intervals, are updates published in multiple TIBCO
Rendezvous messages or a single large message?
If you are using publish by value, a TIBCO Rendezvous message is created for
each individual update. If you are using publish by reference, that operation
will get the last update.
Can an adapter instance write to tables that belong to a database account different from that
used by the adapter?
Yes. A source table or destination table can belong to a different database user
than the default account created in create_user.sql. For more information, see
Referencing External Schemas on page 10.
Can TIBCO Adapter for ActiveDatabase guarantee exactly once delivery of messages over
RVCM?
Exactly once delivery of messages over RVCM is not currently guaranteed. The
same quality of service that RVCM provides is supported, which is at least once.
To get exactly once delivery requires combining the messaging operations and the
database operations in a single atomic transaction, which is not supported in
RVCM.
What guarantees does the adbagent make with regards to the order of database operations?
For instance, is it guaranteed that for a given table, modifications are made in the same order
that they were made to the source database? What guarantees are made for operations across
different tables?
TIBCO Adapter for ActiveDatabase guarantees that for database operations that
are published on the same subject, the order of the operations is preserved.
Usually, this applies to database operations made to one table. It does not usually
apply to database operations across different tables.
When using RVCM for delivery, at what point does the subscribing adapter acknowledge an
incoming message?
A TIBCO Adapter for ActiveDatabase subscriber confirms the message only after
the database operation is committed. If there is an error and no exception table is
used, the database operation is rolled back and no confirmation is sent. If there is
an error and an exception table is used, the insert to the exception table is
committed and the message is then confirmed.
By maintaining the publishing tables, all changes to the source table can be captured. If,
however, there is a failure between the point of publishing a message using RVCM and
updating the publishing table, will the adapter republish the message that has already been
sent?
Yes, the message will be republished and the subscriber would have to deal with
the duplicate message.
For the subscriber adapter, if failure occurs after doing a database update and before sending
an acknowledgement back to the publisher adapter, can the restarted configuration be
prevented from redoing the update operation?
No. This would cause a duplicate insert.
For a certified subscriber adapter, if an insert exception occurs and no exception table is
specified, what happens?
If the tibco.clientVar.DirTrace option is specified in the adapter’s properties
file when the adapter is started, exception handling information is written to the
log file and the configuration continues to run. Since the insert could not be
performed, the ADB_L_DELIVERY_STATUS publishing table column has a value of
P for the message.
The session names are automatically created. Can these be changed, without confusing TIBCO
Adapter for ActiveDatabase, so that we can use a standard naming convention throughout the
entire integration process?
No, the session names are fixed and used by TIBCO Adapter for ActiveDatabase
internally. They cannot be altered.
What’s the proper way to permanently remove an adbagent subscriber when using CM? One
way is to completely REMOVE the publisher’s ledger and to change all ’P’ records back to ’N’,
then restart the publisher. Is there a better, more correct or automated method?
There is a TIBCO Hawk method, unRegisterListener(), which unregisters a
CM subscription. This is the proper way to remove the adbagent subscriber as a
CM listener.
Can an adapter instance collate information from several database tables to send as a single
TIBCO Rendezvous message, or can it only publish data from a single table, in the format
defined by that table?
There are two ways to publish related tables:
• Set the adb.publishChildData option to on when configuring the adapter’s
properties file. When there are insertions into parent table, the adapter will
publish parent rows and the corresponding child rows using TIBCO
ActiveEnterprise or XML format.
Note that the adapter currently does not support publishing child data in the
TIBCO Rendezvous Message format. Update and delete on parent-child
relationship when publishing is also not supported. See Publisher Options Tab
on page 78.
• Combine several tables into one table using a trigger and then publish from
the combined table.
When publishing or subscribing, an adapter instance allows you to change the
message using the callout library. See User Callout Library on page 200 for details.
Why does TIBCO Designer display a Java exception error while I’m trying to use TIBCO
Designer through Exceed?
When using Exceed to simulate an X Windows environment, start the X Windows
server in the Exceed Session Startup Application. In this application, make sure
the Run X server checkbox is selected, then try TIBCO Designer again.
When my Sybase transaction log becomes full, the adapter hangs. How can I fix this problem?
When a Sybase transaction log becomes full, if the database setting abort trans
on log full is set to false, your application will hang instead of printing a
transaction log full error. Execute the following command:
sp_dboption dbname, "abort tran on log full", true
Request-Response Questions
When using request-response, can an INSERT statement with values only (without field names)
be sent to the improve application's performance.?
Yes this is allowed. Your application can also send INSERT statements without the
binds.
Can an application send UPDATE statements to a subscriber adapter with only those fields
which are being updated? That is, if a table has ten records and only two should be updated,
can an UPDATE statement be constructed and sent only for those fields?
Yes, this is supported.
Does an adapter instance send responses back as one large message with all rows in it or is
the message sent in chunks?
The adapter sends results back to an application as one large message.
If a failure occurs when doing an insert or update, what is returned to the application?
If an error occurs while the adapter is processing a request, an error code and
description is returned to the application. In the case of success, a result set and
row count is returned to the application.
This appendix explains the trace messages in TIBCO Adapter for ActiveDatabase.
These include status messages, informational messages, error messages, and
other types of messages.
Topics
Overview
Trace messages provide information about adapter activities. The messages are
logged to the console where the runtime adapter was started and to a log file in a
location specified during configuration. Trace messages can also be redirected to
the TIBCO Hawk Display application, or sent to other applications using the
TIBCO Rendezvous transport.
Each trace message can include the following fields in the order shown:
Timestamp Adapter_Identifier Role Category Status_Code Tracking_Identifier
Application_Information
The above fields are explained in Trace Message Fields on page 289. The
following example shows a trace message containing some of these fields and
then identifies the fields.
2003 Feb 22 20:15:12:937 GMT -8
FileAdapter.FileAdapterConfiguration Info [Adapter]
AEFA-000067 Message containing class
/tibco/public/class/ae/Customer received on subject
FROM.SAP tracking=#MU3oTJ/WWCV1MU96J0zzwA9kzzw#
Example 1: The following message indicates that TIBCO Adapter for Files has started. The
Adapter Started timestamp indicates when the adapter started, and the role indicates that the trace
message is informational, which means the activity is normal for the adapter. The
category is identified, and the corresponding status code is displayed. The status
code indicates that the adapter started successfully.
2003 Feb 22 20:14:51:718 GMT -8
FileAdapter.FileAdapterConfiguration Info [Configuration]
AEFA-000058 TIBCO Adapter for Files successfully initialized
Example 3: The final trace message indicates the object has been moved to the output
Object Moved directory, which completes the adapter’s interaction with the object. Because the
trace message is the termination point, the tracking identifier is not displayed.
Adapter Name of the adapter that wrote the trace message. This is a combination of the
Identifier adapter acronym and adapter configuration name. For example, the
application identifier, ADB.publisher1 identifies a TIBCO Adapter for
ActiveDatabase service named publisher1.
Status Code Unique code for the message and description. Status codes are identified by a
unique number and description. If a trace message includes an error or warn
role, the status code documentation includes a resolution. See Status Messages
on page 297 for details.
Status Code Unique code for the message and description. Status codes are identified by a
unique number and description. If a trace message includes an error or warn
role, the status code documentation includes a resolution. See Status Messages
on page 297 for details.
Status Code Unique code for the message and description. Status codes are identified by a
unique number and description. If a trace message includes an error or warn
role, the status code documentation includes a resolution. See Status Messages
on page 297 for details.
Status Messages
AEADB-200008 Preregistering %1 on %2
errorRole Configuration Conflicting options are used. Check the log file
and restart the adapter with the correct options.
AEADB-200013 AEADB-POLLINGINTERVAL-NEGATIVE-ERR
AEADB-200014 AEADB-POLLINGINTERVAL-SAME-WARN
AEADB-200015 AEADB-POLLINGINTERVAL-CHANGED
AEADB-200016 AEADB-POLLINGBATCHSIZE-NOVALUE-ERR
AEADB-200017 AEADB-POLLINGBATCHSIZE-NEGATIVE-ERR
AEADB-200018 AEADB-POLLINGBATCHSIZE-SAME-WARN
AEADB-200019 AEADB-POLLINGBATCHSIZE-CHANGED
debugRole Metadata
debugRole Metadata
AEADB-600002 %1Failed to get queue count for event queue %2 on session %3: %4
AEADB-600003 %1Failed to get queue limit for event queue %2 on session %3: %4
AEADB-700001 SQL: %1
AEADB-700003 %1Binding data to placeholders: unknown column type, %1 for field %2.
Ignoring
AEADB-700009 %1Cannot bulk insert for variable binary type in column %2.%3.
AEADB-700021 %1 = %2
debugRole Adapter
AEADB-700022 %1 = NULL
debugRole Adapter
AEADB-700026 %1 = %2
debugRole Adapter
AEADB-700029 %1
AEADB-700032 %1sent to %2
AEADB-700033 %1
AEADB-700037 %1
AEADB-700045 %1endpoints %2
AEADB-700063 %1starts
AEADB-700064 %1Request: %2
debugRole Adapter
AEADB-700065 %1Reply: %2
debugRole Adapter
debugRole Adapter
errorRole Adapter The database object was not found. Check to see
if the object really exists (perhaps in another
schema) and if you have permission to access it.
errorRole Adapter There was an error doing the bulk insert into the
table. Use the error returned by the database to
determine how to fix inserts into the table.
AEADB-700114 %1
AEADB-890001 AEADB-CONN-RETRY
AEADB-890002 AEADB-CONN-RETRYSUCCESS
AEADB-890003 AEADB-CONN-RETRYFAIL
AEADB-890004 AEADB-CONN-PUBDUP
AEADB-890005 AEADB-CONN-REQERR
AEADB-890007 AEADB-CONN-SVCSUSPEND
AEADB-910004 AEADB-STARTUP-4
AEADB-910005 AEADB-STARTUP-5
AEADB-910007 AEADB-STARTUP-7
AEADB-920002 AEADB-SUB-2
AEADB-920006 AEADB-SUB-6
AEADB-920015 AEADB-SUB-15
AEADB-920017 AEADB-SUB-17
AEADB-930002 AEADB-PUB-2
AEADB-940001 AEADB-REQRESP-1
AEADB-940009 AEADB-REQRESP-9
AEADB-940012 AEADB-REQRESP-12
AEADB-990002 AEADB-SHUT-2
The Apache Software License, Version 1.1 1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Copyright (c) 1999 The Apache Software Foundation. All rights
reserved. 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
Redistribution and use in source and binary forms, with or without documentation and/or other materials provided with the distribution.
modification, are permitted provided that the following conditions are
met: 3. The end-user documentation included with the redistribution, if any,
must include the following acknowledgment:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer. "This product includes software developed by the Apache Software
Foundation (http://www.apache.org/)." Alternately, this
2. Redistributions in binary form must reproduce the above copyright acknowledgment may appear in the software itself, if and wherever
notice, this list of conditions and the following disclaimer in the such third-party acknowledgments normally appear.
documentation and/or other materials provided with the distribution.
4. The names "Xalan" and "Apache Software Foundation" must not be
3. The end-user documentation included with the redistribution, if any, used to endorse or promote products derived from this software
must include the following acknowledgment: "This product includes without prior written permission. For written permission, please
software developed by the Apache Software Foundation contact [email protected].
(http://www.apache.org/)." Alternately, this acknowledgment may
appear in the software itself, if and wherever such third-party 5. Products derived from this software may not be called "Apache",
acknowledgments normally appear. nor may "Apache" appear in their name, without prior written
permission of the Apache Software Foundation.
4. The names "Xerces", "Xalan" and "Apache Software Foundation"
must not be used to endorse or promote products derived from this THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED
software without prior written permission. For written permission, OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
please contact [email protected]. Products derived from this THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
software may not be called "Apache", nor may "Apache" appear in FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
their name, without prior written permission of the Apache Software NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
Foundation. ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT POSSIBILITY OF SUCH DAMAGE.
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER This software consists of voluntary contributions made by many
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN individuals on behalf of the Apache Software Foundation and was
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING originally based on software copyright (c) 1999, Lotus Development
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF Corporation., http://www.lotus.com. For more information on the
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE Apache Software Foundation, please see <http://www.apache.org/>.
POSSIBILITY OF SUCH DAMAGE.
* This software consists of voluntary contributions made by many W3C IPR SOFTWARE NOTICE
individuals on behalf of the Apache Software Foundation and was
originally based on software copyright (c) 1999, Lotus Development Copyright 2000 World Wide Web Consortium, (Massachusetts
Corporation., http://www.lotus.com. For more information on the Institute of Technology, Institut National de Recherche en Informatique
Apache Software Foundation, please see <http://www.apache.org/>./ et en Automatique, Keio University). All Rights Reserved.
The DOM bindings are published under the W3C Software Copyright
The Apache Software License, Version 1.1 Noticeand License. The software license requires "Notice of any
changes ormodifications to the W3C files, including the date changes
Copyright (c) 1999 The Apache Software Foundation. All rights were made."
reserved.
Consequently, modified versions of the DOM bindings must document
that they do not conform to the W3C standard; in the case of the IDL
Copyright 1994-2000 World Wide Web Consortium, (Massachusetts "IBM Public License Version 1.0
Institute of Technology, Institut National de Recherche en Informatique
et en Automatique, Keio University). All Rights Reserved. THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE
http://www.w3.org/Consortium/Legal/ TERMS OF THIS IBM PUBLIC LICENSE ("AGREEMENT"). ANY
USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
This W3C work (including software, documents, or other related CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
items) is being provided by the copyright holders under the following AGREEMENT.
license. By obtaining, using and/or copying this work, you (the
licensee) agree that you have read, understood, and will comply with 1. DEFINITIONS
the following terms and conditions:
"Contribution" means: a) in the case of International Business
Permission to use, copy, and modify this software and its Machines Corporation ("IBM"), the Original Program, and b) in the
documentation, with or without modification, for any purpose and case of each Contributor, i) changes to the Program, and ii) additions
without fee or royalty is hereby granted, provided that you include the to the Program; where such changes and/or additions to the Program
following on ALL copies of the software and documentation or portions originate from and are distributed by that particular Contributor. A
thereof, including modifications, that you make: Contribution 'originates' from a Contributor if it was added to the
Program by such Contributor itself or anyone acting on such
1.The full text of this NOTICE in a location viewable to users of the Contributor's behalf. Contributions do not include additions to the
redistributed or derivative work. Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and
2.Any pre-existing intellectual property disclaimers, notices, or terms (ii) are not derivative works of the Program. "Contributor" means IBM
and conditions. If none exist, a short notice of the following form and any other entity that distributes the Program.
(hypertext is preferred, text is permitted) should be used within the
body of any redistributed or derivative code: "Copyright "Licensed Patents " mean patent claims licensable by a Contributor
[$date-of-software] World Wide Web Consortium, (Massachusetts which are necessarily infringed by the use or sale of its Contribution
Institute of Technology, Institut National de Recherche en Informatique alone or when combined with the Program.
et en Automatique, Keio University). All Rights Reserved.
http://www.w3.org/Consortium/Legal/" "Original Program" means the original version of the software
accompanying this Agreement as released by IBM, including source
3.Notice of any changes or modifications to the W3C files, including code, object code and documentation, if any.
the date changes were made. (We recommend you provide URIs to
the location from which the code is derived.) "Program" means the Original Program and Contributions. "Recipient"
means anyone who receives the Program under this Agreement,
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," including all Contributors.
AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT 2. GRANT OF RIGHTS
LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE a) Subject to the terms of this Agreement, each Contributor hereby
SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY grants Recipient a non-exclusive, worldwide, royalty-free copyright
THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR license to reproduce, prepare derivative works of, publicly display,
OTHER RIGHTS. publicly perform, distribute and sublicense the Contribution of such
Contributor, if any, and such derivative works, in source code and
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, object code form.
INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. b) Subject to the terms of this Agreement, each Contributor hereby
grants Recipient a non-exclusive, worldwide, royalty-free patent
The name and trademarks of copyright holders may NOT be used in license under Licensed Patents to make, use, sell, offer to sell, import
advertising or publicity pertaining to the software without specific, and otherwise transfer the Contribution of such Contributor, if any, in
written prior permission. Title to copyright in this software and any source code and object code form. This patent license shall apply to
associated documentation will at all times remain with copyright the combination of the Contribution and the Program if, at the time the
holders. Contribution is added by the Contributor, such addition of the
Contribution causes such combination to be covered by the Licensed
Patents. The patent license shall not apply to any other combinations
International Business Machines Corporation which include the Contribution. No hardware per se is licensed
hereunder.
This product includes software developed by International Business
Machines Corporation. Copyright (c) International Business Machines. c) Recipient understands that although each Contributor grants the
All rights reserved. licenses to its Contributions set forth herein, no assurances are
provided by any Contributor that the Program does not infringe the
4. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS These supplemental license terms ("Supplemental Terms") add to or
AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS, modify the terms of the Binary Code License Agreement (collectively,
REPRESENTATIONS AND WARRANTIES, INCLUDING ANY the "Agreement"). Capitalized terms not defined in these
IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A Supplemental Terms shall have the same meanings ascribed to them
Index
Symbols adding
listeners 186
* 184 adding a sequence for parent-child 194
. 184 adding an association for parent-child 195
> 184 agents 232
_ 36, 184 alerter
on Microsoft SQL Server 134
on Sybase SQL Server 140
alerts 232
A auto-discovery process, TIBCO Hawk 234
L N
ledger files naming restrictions
location 188 adapters 36
moving 188 database columns 37
publication size status 119 publishing table 81
publication timeout status 119 subjects 184
retrieving information through TIBCO Hawk 255 notify procedure
listeners, adding 186 on Microsoft SQL Server 138
load balancing 101, 131 on Sybase 140
across adapters 166 notifytable procedure
in an adapter 164 on Microsoft SQL Server 138
Log File field, adapter 61 on Sybase 140
log file options 211 NULL attributes 85
log files location 59
Log Info field, adapter 61
Log to Standard field, adapter 61
logtest, sample program 18 O
LONG data type 78
loop detection obfuscation 115
column used for 176 opaque format, using to publish 18
defined 11
using for replication 11
S T
same-named adapters 17 table access problems, overcoming 73
sample programs technical support xix
logtest 18 TIBCO Hawk
schema changes affecting adapter configuration 38 background information 232
schemas enterprise monitor components 232
for related tables 74 methods supported 238
referencing external 10 Monitoring tab use with 63
sequence number 170 TIBCO Hawk methods
source data publishing 192 getComponents 245
source data publishing example 198 getConfig 246
source table getRvConfig 249
loop detection column 176 getStatus 250
schema for 10 reviewLedger 255
source table changes 171 TIBCO Rendezvous, retrieving configuration through
SQL statement terminator 218 TIBCO Hawk 249
SQL_BATCHRETURN class, structure of 157 Tracing 288
SQL_BIND class, structure of 158 tracing features 211
SQL_OPS class, structure of 155 Tracing Levels and Fields 289
SQL_RESULTSET class, structure of 156 tracking identifier 288, 296
SQL_RETURN class, structure of 156 triggers
SQL_ROW class, structure of 156 how they are generated 171
SQL_STATEMENT class, structure of 158 no primary key 71
Standard Microagent Name field, adapter 63 purpose 171
standard RPC operation 155
starting an alerter on Oracle 135
stopping an adapter 37
sub-batch-commit-timeout, adapter option 120 U
sub-bulk-insert-size, adapter option 120
subjects underscore character 184
changing dynamically 16 update feature 16
naming restrictions 184 update trigger 71
parameterized 185 Use Advanced Logging field, adapter 59
subscriber 36 user authority 73
using wildcards 184, 186 user callout library 200
subscriptions user schema 134
size limitations 36 username property 123
wire format for 190 use-trace-file, adapter option 211
substitution 38 usr
support, contacting xix alerter option on Oracle 136
–system
configurl command-line argument 116
V
variable substitution 38
variables 38
version, adapter option 112, 123
W
wildcard subject names 184, 186