http localhost 9889 doc ad bad apter html tib adadb config depl

Upload: rajisgood

Post on 08-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    1/13

    Chapter 4 Adapter Service Options : Publication Service Tabs

    Publication Service Tabs

    When running as a publisher, the adapter extracts data from the changed rows fromdatabase tables and publishes them on appropriate subject names.

    You can configure parameters under the following tabs:

    Configuration Tab

    Tables Tab

    DB2/OS390 Tab

    DB2/AS400 Tab

    Publisher Options Tab

    Advanced Tab

    Configuration Tab

    The wire format for the publication and subscription services must be the same, otherwise anerror will occur. .

    Field Description

    Name You can use the default name or replace it with a name of your choice.

    TransportType

    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 ofthe Configuration tab.

    The transport can be configured to use a trusted store and identity resourcefor use in SSL (Secure Sockets Layer) configurations. TIBCO Rendezvoussessions and JMS topics have an SSL configuration field which uses a dialogto perform SSL configuration.

    To enable and configure SSL, in the Project panel, expand the Advancedfolder, then expand the Sessions folder. Select the TIBCO Rendezvoussession or JMS topic and click Use SSL?. The SSL configuration options areexplained in the online help associated with the session dialog. Click thequestion mark to display the online help.

    Quality ofService

    (Only available when TIBCO Rendezvous is selected as the transport type)Select the level of service that determines how messages are sent. SeeQuality of Service 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 boththe publisher and subscriber must be the same, otherwise an error will occur.See Wire Formats for a description of these formats.

    ActiveEnterprise Message (TIBCO Rendezvous transport type only)

    Rendezvous Message (TIBCO Rendezvous transport type only)

    Table 15 Publication Service:Configuration Tab

    Page 1 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    2/13

    XML Message

    ConnectionFactory Type

    (Only available when JMS is selected as the transport type) ConnectionFactory objects create JMS connections for sending and receiving messages.Available choices are:

    Topic

    Publish-subscribe messaging. A message published to a topic is broadcast toone or more subscribers. All messages published to the topic are received byall services that have subscribed to the topic.

    Queue

    Point-to-point messaging. A message sent to a queue is consumed by oneand only one receiver. Each message has only one receiver though multiplereceivers may connect to the queue. The first receiver to access the queuegets the message. The other receivers do not.

    DeliveryMode

    (Only available when JMS is selected as the transport type) The deliverymode for each message sending operation. See Delivery Mode for adescription of each mode.

    Persistent

    Non-Persistent

    Note the following restrictions:

    A service name must use alphanumeric characters. An underscore (_) character can beused. The entire instance name must be less than 80 characters. The space charactercannot be used in an instance name.

    A service name cannot use global variables.

    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 otherschemas, the database user specified in the Design-time Connection Tab tab must have theproper set of permissions granted. This is described in Referencing an External Schema.

    If a primary key is not defined for a table, the update and delete triggers willnot be generated for the table. To define a primary key for the table, selectthe User Key column in a table row. The update and delete triggers will thenbe defined.

    Page 2 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    3/13

    Icons

    Add Table Click to display a dialog box that list tables available to the databaseuser specified in the adapter Connection tab. Select the source table to publish fromwhen data is inserted into it.

    Add Child Table Displays a dialog box from which a secondary table can beadded to the configuration.

    Add Table from Other Schema Allows you to add a table from a differentschema than the current database user schema. For instructions on granting accessprivileges to an external schema, see Referencing an External Schema. You can use this

    icon to add different schema at the parent and child levels.

    Remove Table Deletes the selected table from the list.

    Re-find Tables from Database Causes TIBCO Designer to refresh storedtable schema information by retrieving new information from the database.

    Load Table Schema from Database Allows you to load a database tableschema, convert it into a TIBCO ActiveEnterprise schema, and store it in the schemafolder of an instance.

    Allow Key Columns Only

    When this box is checked, child columns are joined only to a key column. When unchecked,child columns can be joined to any column.

    Select/Deselect All Columns to Publish

    When this box is checked, all of the boxes in the Use column are checked, so all columns inthe tables are published. Unchecking this box unselects all of the columns. You can alsoindividually check and uncheck the Use boxes.

    Table 16 Publication Service Tables tab

    Page 3 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    4/13

    Field Description

    Tables andColumns

    The loaded tables and columns.

    indicates a table or child table.

    indicates a normal column.

    indicates a User Key column.

    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 avalue 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-childrelationships.

    Referencing an External Schema

    To reference an external schema in TIBCO Designer, the default schema must have theproper access privileges. These are set in a command line. In the following syntax,adb_schema refers to the default schema in create_user.sql.

    For Oracle, log in as system and grant create any trigger and drop any trigger permissionsto the default schema. For example:

    grant create any trigger to adb_schema

    grant drop any trigger to adb_schema

    In addition, Oracle and Sybase users must have permission to SELECT from a source table inan external schema. If table relationships are used, SELECT permission is required for bothparent and child tables. SELECT, INSERT, UPDATE, and DELETE permissions are required foraccessing 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 creatingcatalog 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 ActiveDatabaseuser authority to *ALLOBJ.

    Adding Child Tables

    This section describes how to add a related child table definition for publishing data.

    Data models typically contain tables that share column data through a relationship. You canconfigure a publishing table to include related data from another table when it publishes.Data from the related table is not copied into the publishing table, but is fetched by reference.

    Page 4 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    5/13

    When rows are inserted into the publishing table, a message that includes data from thesource table and related (child) table is published. On the subscriber side, a correspondingtable with the same columns as the child table associated with the publishing table must bespecified.

    Adding child tables requires two separate procedures, one for the publisher adapter andanother for the subscriber. First, you add child tables for the source table, then you add childtables 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 thedestination 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 musthave the same columns.

    When parent-child relationships are defined, a subscriber adapter must use the samerepository as the publisher adapter.

    When you add a child table, TIBCO Designer creates a class object in the repository for thechild table, and an association object for the relationship.

    To enable publishing child table related data, the publisher adapterproperties file must have the adb.publishChildData option set to on.

    After adding child tables for a subscriber adapter, you create mappings between child tableson the publisher side and child tables on the subscriber side. For instructions, see ChildTable Mappings Tab.

    To add child tables for parent-child relationships, do the following in the Publication ServiceTables 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 ineach 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. Akey icon displays next to the column name.

    You must also specify the relationship between the primary column in the parent table andthe 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 parenttable primary key column from the drop-down list.

    7. Click Apply.

    In the following example, a publication service that publishes newly inserted rows into thesource table is created. Publisher Options Tab explains how to configure the publisheradapter to publish data by value or by reference.

    Page 5 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    6/13

    In the following example, a subscription is created such that received data will be insertedinto the SUB_ORDER_DETAILS destination table. All three columns of the destination table areconfigured to receive data.

    The following example shows a child table mapped. The left column (Subscriber ChildTable Name) contains the subscriber child table and the right column (Publisher ChildTable Name) contains the publisher child table.

    Page 6 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    7/13

    DB2/OS390 Tab

    This tab appears when the Vendor field in the Adapter Instance Configuration Tab is set toDB2 OS390.

    When the DB2 load utility loads rows to the source table, it does not activatethe tables INSERT triggers. Loaded data is not published.

    Field Description

    DatabaseName

    Enter the name of the database that you want to put your publisher table in.

    Table 17 Publication Service DB2/OS390 Tab

    Page 7 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    8/13

    Table SpaceName

    Enter the name of the table space where the publisher table is located.

    Storage Group

    Optional. Enter the designator of the storage group that will hold thepublisher 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 willappend to each of the indexes (IDX1_, IDX2_, and IDX3_).

    Trigger Suffix Enter a suffix of your choice, up to 5 characters, that adapter software willappend to each of the triggers (T1, T2, and T3).

    DB2/AS400 Tab

    This tab appears when the Vendor field in the Adapter Instance Configuration Tab is set toDB2 AS400.

    Trigger Option

    Synchronous (deprecated) The trigger is written in RPG. When copying from thesource table to the publishing table, the prompt is not returned until all data is written.

    Asynchronous When copying from the source table, data is inserted into a data queueand then inserted into the publishing table asynchronously. The prompt is not blocked, soyou can continue working while data is inserted into the publishing table.

    Specify values for the following options:

    Number of DataQueue Listeners: The number of prestarted listener jobs.

    Listener Job Queue: The name of the queue on the AS/400 machine where thelistener jobs are submitted.

    If you select Asynchronous, you must go to the adapters Design-time Connection taband add ;transaction isolation level=none to the end of the JDBC URL field value. Forexample:

    SQL The trigger is written in SQL. When copying from the source table to thepublishing table, the prompt is not returned until all data is written.

    Sybase Options

    Page 8 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    9/13

    This tab appears when the Vendor field in the Adapter Instance Configuration Tab is set toSybase.

    Check the checkbox for Overwrite Triggers? to delete and re-create existing triggers of thepublishing table.

    Publisher Options Tab

    When you add a new publishing table, a new entry is inserted into the repository for thepublisher adapter. The entry includes the name of a publishing table along with a sequence,stored procedure, and trigger. A class object for the publication is created in the repository.

    Field Description

    StorageMode

    Publish by Value copies all specified columns in the source table to thepublishing table.

    Publish by Reference copies only key column values to the publishingtable. If no key column is defined in the database, a substitute non-key

    column must be defined to publish by reference.For each publisher service, you must specify a Storage Mode: Publish byValue or Publish by Reference. See Publish by Value and Publish byReference for more information.

    PublishingTable

    Name of the database table used to store a copy of data to be published. Thetable name can be qualified using the .format. Thepublishing table cannot contain any user-created columns where the columnname 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_. Forexample, if your source table is MY_ORDER, its publishing table should benamed P_MY_ORDER.

    A publishing table name must be less than 64 characters.

    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 rowexists, it performs an insert.

    Enable LoopDetection

    Select to enable loop detection and prevent an infinite loop from occurringwhen the publishing and destination table are the same table. Loop detectionis disabled for DB2 on z/OS because of DB2 on z/OS feature limitations.

    Do NotGenerateTriggers

    Select to prevent the generation of triggers. Although this option is notrecommended, it allows you to manually manage the insertion of data into thepublishing table.

    Use Alerter

    Select to use the alerter. This option appears only if you are using an Oracledatabase. See Chapter 6, Using the Alerter for details.

    EnableGroupMessaging

    Select to use group messaging.

    Table 18 Publication Service DB2/AS400 Tab

    Page 9 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    10/13

    Group Size

    Appears only when Enable Group Messaging is selected. Specify thenumber of rows to publish in a single message.

    Publish by Value

    With Publish by Value, all specified columns in the source table are copied to thepublishing table. Publishing by value is fast, but does not support some data types, forexample 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 sourcetable that contains a column with a LONG data type, that column cannot be specified forinclusion in the publishing table. This is because the trigger generated by the palettecannot refer to the LONG column via the :new construct.

    This is an Oracle restriction documented in the Oracle SQL Referencemanual. Theproblem is not detected by Oracle during trigger creation. However, when the trigger firesand 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 childtable can contain a column with a LONG data type. This is because data on child tablerows 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 andLONG or LONG RAW are non-key types.

    In the following example, the publishing table P_CUSTOMER is created for the source table,

    CUSTOMER. When CUSTOMER is updated, the new data will be copied to P_CUSTOMER. Theadapter will poll P_CUSTOMER and publish the new data.

    In this example, loop detection is enabled. If a subscription exists that usesthe same subject and CUSTOMER as the destination table, any changes to

    CUSTOMER will not be published repeatedly.

    Page 10 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    11/13

    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 tablewithout first copying the data from the source table to a publishing table. A trigger, storedprocedure, and publishing table are created, but the publishing table contains the necessaryadapter fields and only the key fields of the source table. For more information, see Start orStop the Adapter.

    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 byreference.

    A key column or substitute key column is required when publishing by reference, since thepublishing table contains only key values. If no column is specified, the publication is notadded.

    To use a view or other database object as the source table, you canconfigure the adapter to publish by reference object, where key columns arestored in the publishing table and data to publish is selected from thereference object. For details, see Publishing by Reference Object.

    In the following example, the publisher adapter is configured to publish from the P_CUSTOMERtable with a key field CUST_ID. The publishing table is created with the necessary fields andthe 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 adapterpolls 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.

    Page 11 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    12/13

    Advanced Tab

    Specify values for the following fields:

    Field Description

    Destination (Only available when JMS is selected as the transport type in the AdapterInstance Configuration Tab)

    The publisher destination. A service uses a default destination generatedusing the Domain and Deployment global variables, the adapter acronym, theadapter instance name and the service name. If you use this defaultdestination, make sure the values for Domain and Deployment are not empty.

    Alternatively, you can manually enter a destination in this field. The destinationdoes not have to be predefined in the TIBCO Enterprise Message Serviceserver. The destination can be static or dynamic.

    See the TIBCO Enterprise Message Service documentation for informationabout destinations.

    MessageSubject

    (Only available when TIBCO Rendezvous is selected as the transport type inthe Adapter Instance Configuration Tab)

    Publisher subject. By default, a service uses a message subject that isgenerated using the Domain and Deployment global variables, the adapteracronym, the adapter instance name and the service name. If you use thisdefault subject, make sure the values for Domain and Deployment are not

    empty. You can type a TIBCO Rendezvous subject name different from thedefault in this field.

    See TIBCO Rendezvous Conceptsfor information about specifying subjectnames.

    EndpointReference

    Displays the endpoint reference. Click the Browse icon to change theendpoint reference, the Go To icon to reconfigure the existing reference, orthe Delete icon to delete the reference. Endpoint reference objects areexplained in TIBCO Designer Palette Reference.

    Table 19 Publication Service Advanced Tab

    Page 12 of 13Publication Service Tabs

    4/5/2011http://localhost:9889/doc/adbadapter/html/tib_adadb_config_deploy/ADB_config_deploy.5. ...

  • 8/6/2019 Http Localhost 9889 Doc Ad Bad Apter HTML Tib Adadb Config Depl

    13/13

    ClassReference

    Click the Go To icon to reconfigure the existing reference. "Clear reference"can be used to remove the reference under Endpoint Reference. Classreference objects are explained in TIBCO Designer Palette Reference.

    Copyright TIBCO Software Inc. All Rights Reserved.

    Page 13 of 13Publication Service Tabs