BEA Logo BEA BEA Tuxedo Release [Release Number]

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   BEA Tuxedo Doc Home   |   Using the CORBA Notification Service   |   Previous Topic   |   Next Topic   |   Contents   |   Index

CORBA Notification Service Administration

 

This topic includes the following sections:

 


Introduction

The BEA Tuxedo CORBA Notification Service is layered on the BEA Tuxedo EventBroker and Queuing systems. This means that administering the CORBA Notification Service requires that you also administer these other BEA Tuxedo systems. You use the BEA Tuxedo utilities tmadmin, qmadmin, and ntsadmin to administer the Notification Service.

Notification Service administration is comprised of two related tasks: configuration and management. Although these areas are discussed separately, they are in fact, interrelated. Thus, to fully understand configuration, you must also understand management and vice versa.

 


Configuring the Notification Service

Before you can run event Notification Service applications, the following configuration requirements must be satisfied:

 


Configuring Data Filters

If data filtering or BEA Tuxedo ATMI interoperability is used in subscriber applications, you must perform the following steps to use data filtering in subscriptions:

  1. Create the BEA Tuxedo ATMI FML field table definition file that describes the fields on which to filter (see Listing 7-2).

  2. In the UBBCONFIG file, specify where the FML field table definition file is located so that when the application is started, the location of field definition files is passed to the Notification Service servers (see Listing 7-3).

In Listing 7-1, the code that is shown in bold text shows how the data filtering is implemented in an event poster application. Only subscriptions that contain the name/value pair billing and patient_account will receive the event.

Listing 7-1 Sample Data Filtering Using the BEA Simple Events API (C++)

CosNotification::StructuredEvent notif;
notif.header.fixed_header.event_type.domain_name =
CORBA::string_dup("HEALTHCARE");
notif.header.fixed_header.event_type.type_name =
CORBA::string_dup("HMO");
// Specify an additional filter, based upon name and value 
// for this event.
notif.filterable_data.length(2);
notif.filterable_data[0].name = CORBA::string_dup("billing");
notif.filterable_data[0].value <<= CORBA::Long(1999);
notif.filterable_data[1].name =
CORBA::string_dup("patient_account");
notif.filterable_data[1].value <<= CORBA::Long(2345);
// Push the structured event onto the channel.
testChannel->push_structured_event(notif);

Listing 7-2 shows the FML field table definitions file needed to use data filtering.

Listing 7-2 Data Filtering FML Field Table File

*base 2000
#Field Name      Field #  Field Type    Flags     Comments
#----------- ------- ---------- ------ --------
billing 1 long - -
patient_account 2 long - -

Listing 7-3 shows the content of environment variable file (envfile). The envfile contains the location of the FML field definitions file.

Note: You can name the environment variable file whatever you want, but the name used must match the name specified for the ENVFILE configuration option n, the SERVERS section of the UBBCONFIG file.

Listing 7-3 Envfile Specification for Data Filtering (envfile) (Microsoft Windows)

FLDTBLDIR32=D:\tuxdir\EVENTS_Samples\ADVANCED_Simple_cxx\common
FIELDTBLS32=news_flds

Listing 7-4 shows, in bold text, how the location of the FML field table file is specified in the UBBCONFIG file for the Advanced samples.

Listing 7-4 Specifying the FML Field Definitions File in the UBBCONFIG File

*SERVERS
TMSYSEVT
SRVGRP = NTS_GRP
SRVID = 1
TMUSREVT
SRVGRP = NTS_GRP>>$@
SRVID = 2
ENVFILE = "D:\tuxdir\EVENTS_Samples\ADVANCED_Simple_CXX\envfile"
TMNTS
SRVGRP = NTS_GRP
SRVID = 3
ENVFILE = "D:\tuxdir\EVENTS_Samples\ADVANCED_Simple_CXX\envfile"
CLOPT = "-A -- -s TMNTSQS"
TMNTSFWD_T
SRVGRP = NTS_GRP
SRVID = 4
ENVFILE = "D:\tuxdir\EVENTS_Samples\ADVANCED_Simple_CXX\envfile"
TMNTSFWD_P
SRVGRP = NTS_GRP
SRVID = 5
ENVFILE = "D:\tuxdir\EVENTS_Samples\ADVANCED_Simple_CXX\envfile"

 


Setting the Host and Port

The object references host and port number requirements for the callback object are as follows:

You specify the port number from the user range of port numbers, rather than from the dynamic range. Assigning port numbers from the user range prevents joint client/server applications from using conflicting ports.

The method you use to set the host and port depends on the programming language you are using.

 


Creating a Transaction Log

When you use persistent subscriptions, you must configure and boot the BEA Tuxedo queuing system. The queuing system requires a transaction log. Listing 7-6 shows how to use the tmadmin utility to create a transaction log.

Listing 7-6 Creating a Transaction Log (createtlog) (Microsoft Windows)

>tmadmin
>crdl -b 100 -z D:\tuxdir\EVENTS_Samples\ADVANCED_Simple_CXX\TLOG
>crlog -m SITE1
>quit
>

 


Creating Event Queues

When you use persistent events, you must configure and boot the BEA Tuxedo queuing system. Two event queues must be created:

To configure these queues, perform the following steps:

  1. Create a device on disk for the queue space.

  2. Configure a queue space.

  3. Create the queues.

These steps are described in the following sections.

Determining Space Parameters for Transient and Persistent Subscriptions

To tune your system for maximum performance, you should determine the optimal values for the following parameters:

IPC Queue Space for Transient Subscriptions

Proceed as follows to determine space parameters for transient subscriptions:

  1. Determine how many events may be in the pipeline for transient subscriptions; that is, how many events may be in the process of being delivered at any given time. This equals the number of events multiplied by the number of subscribers receiving them.

  2. Determine the size of your events. For purposes of this discussion, we will assume that they are relatively small—about 300 bytes or less.

  3. Determine how many transient forwarding servers you would like to start, most likely one or two—one per processor on your machine is a good number to start with.

  4. Determine how much IPC queue space you will need to hold your transient events. The amount of space you need is 1000 bytes multiplied by the number of events you allow in the pipeline. Divide this number by the number IPC queues your transient forwarders have. If you use MSSQ sets, then your transient forwarders share one IPC queue; if you do not, then each forwarder has its own IPC queue.

    For example, if you estimate that there will be 10 events delivered to 50 subscribers in the pipeline, and you start 2 transient forwarders and they do not share an IPC queue (that is, you do not use MSSQ sets), the amount of IPC queue space you need is:

    10 events * 50 subscribers * 1000 bytes / 2 forwarders = 250,000 bytes

  5. Configure the IPC queue size to that number by changing the entries in the system registry. How you do this is platform-specific.

/Q Queue Size Parameter Persistent Subscriptions

Proceed as follows to determine space parameters for persistent subscriptions:

  1. Determine how many events may be in the pipeline for persistent subscriptions; that is, how many events may be in the process of being delivered at any given time. This equals the number of events multiplied by the number of subscribers receiving them.

  2. Determine the size of your events. For purposes of this discussion, we will assume that they are relatively small—about 300 bytes or less.

  3. Determine the size your /Q queues need to be to hold your persistent events (both for your pending queue and error queue). Proceed as follows to do this:

    1. Determine the size of a disk page. This is platform-specific. For example, on Microsoft Windows, a disk page is 500 bytes. On UNIX machines, a disk page could range from 500 to 4000 bytes in size.

    2. Determine how many disk pages you will need to store one event rounding up. For example, if you need 1000 bytes per event and disk pages are 500 bytes, you will need 2 disk pages per event.

    3. Determine how many disk pages you will need for your events. For example, if you want to allow 500 pending events and 200 error events, and an event takes up 2 disk pages, you will need 1400 disk pages.

    4. Determine how many disk pages you will need for your qspace. This is the number of disk pages you need for your events plus some pages for qspace overhead. For example, if you need 1400 disk pages for events, then your qspace needs approximately 1450 disk pages (50 pages of qspace overhead).

    5. Determine how many pages you will need for your qspace device. This is the number of pages you need for the qspace plus some pages for device overhead. For example, if you need 1450 disk pages for your qspace, then your device needs approximately 1500 pages (50 pages of device overhead).

  4. When you use qmadmin to create the qspace for your persistent events, the first phase is to create a device. Use the size computed above in step 3e above (approximately 1500 pages). Next, specify the size of the qspace. Use the size computed in step 3d (approximately 1450 pages). Next, specify how many events can be in the pending queue and how many events can be in the error queue. The following sections explain how to create and configure qspaces.

Creating a Device on Disk for the Queue Space

You use the qmadmin command utility to create a device on disk for the queue space.

Before you create a queue space, you must create an entry for it in the universal device list (UDL). Listing 7-7 shows an example of the commands.

Listing 7-7 Creating a Device on Disk for Queue Space (UNIX)

prompt>qmadmin d:\smith\reg\QUE
qmadmin - Copyright (c) 1996-1999 BEA Systems, Inc.
Portions * Copyright 1986-1997 RSA Data Security, Inc.
All Rights Reserved.
Distributed under license by BEA Systems, Inc.
BEA Tuxedo is a registered trademark.
QMCONFIG=d:\smith\reg\QUE
> crdl d:\smith\reg\QUE 0 1100
Created device d:\smith\reg\QUE, offset 0, size 1100
on d:\smith\reg\QUE

For more information about creating a device on disk, see Using the ATMI /Q Component.

Configuring a Queue Space

You use the qmdamin qspacecreate command to configure queue spaces. A queue space makes use of IPC resources; therefore, when you define a queue space you are allocating a shared memory segment and a semaphore. The easiest way to use the qspacecreate command is to let it prompt you. Listing 7-8 shows an example queue space that is configured for the Advanced sample application.

Listing 7-8 Creating Queue Space

> qspacecreate
Queue space name: TMNTSQS
IPC Key for queue space: 52359
Size of queue space in disk pages: 1050
Number of queues in queue space: 2
Number of concurrent transactions in queue space: 10
Number of concurrent processes in queue space: 10
Number of messages in queue space: 500
Error queue name: TMNTSFWD_E
Initialize extents (y, n [default=n]): y
Blocking factor [default=16]:

In the queue space created in Listing 7-8, take note of the following size settings:

Number of messages in queue space:500

Setting this parameter to 500 allows room for a total of 500 events in the pending and error queues.

Size of queue space in disk pages:1050

On Microsoft Windows, each disk page is 500 bytes and each event needs 1000 bytes. In addition, you must allow 2 disk pages per event. Since you estimate that there will be 500 events in the pending and error queues, then you must allow 1000 disk pages to store them (500 * 2). Also, you must allow 50 disk pages for qspace overhead, so the qspace size is set to 1050 disk pages. Finally, the device needs 50 disk pages of overhead too, so the device size is 1100 disk pages, which you set using the crdl command (see Listing 7-7).

For more information about creating queue space, see Using the ATMI /Q Component.

Creating the Queues

You must use the qmadmin qcreate command to create each queue that you intend to use. Before you can create a queue, you first have to open the queue space with the qmadmin qopen command. If you do not provide a queue space name, qopen will prompt for it.

Listing 7-9 shows an example of creating the TMNTSFWD_P and TMNTSFWD_E queues that are created for the Advanced sample application.

Listing 7-9 Creating Queues

> qopen
Queue space name: TMNTSQS
> qcreate
Queue name: TMNTSFWD_P
Queue order (priority, time, fifo, lifo): fifo
Out-of-ordering enqueuing (top, msgid, [default=none]): none
Retries [default=0]: 5
Retry delay in seconds [default=0]: 3
High limit for queue capacity warning (b for bytes used, B for
blocks used, % for percent used, m for messages [default=100%]):
80%
Reset (low) limit for queue capacity warning [default=0%]: 0%
Queue capacity command:
No default queue capacity command
Queue 'TMNTSFWD_P' created
> qcreate
Queue name: TMNTSFWD_E
Queue order (priority, time, fifo, lifo): fifo
Out-of-ordering enqueuing (top, msgid, [default=none]): none
Retries [default=0]: 2
Retry delay in seconds [default=0]: 30
High limit for queue capacity warning (b for bytes used, B for
blocks used, % for percent used, m for messages [default=100%]):
80%
Reset (low) limit for queue capacity warning [default=0%]: 0%
Queue capacity command:
No default queue capacity command
Q_CAT:1438: INFO: Create queue - error queue TMNTSFWD_E created
Queue 'TMNTSFWD_E' created
> q

For more information about creating queues, see Using the ATMI /Q Component.

Setting IPC Parameters on Microsoft Windows

The BEA Tuxedo software for Microsoft Windows systems provides you with BEA Tuxedo IPC Helper (TUXIPC), an interprocess communication subsystem, that is installed with the product. On most machines, IPC Helper runs as installed; however, you can use the IPC Resources page of the control panel applet to tune the TUXIPC subsystem and maximize performance.

To display the IPC Resources page of the IPC Control Panel, perform these steps:

  1. Click Start—>Settings—>Control Panel. The Microsoft Windows Control Panel is displayed (Figure 7-1).

    Figure 7-1 Microsoft Windows Control Panel


     
     

  2. Click the BEA Administration icon. The BEA Administration Control Panel is displayed (Figure 7-2).

  3. Click on the IPC Resources tab. The IPC Resources Control Panel portion of the BEA Administration Control Panel is displayed (Figure 7-2).

    Figure 7-2 BEA Tuxedo Software for Microsoft Windows IPC Resources Control Panel


     

To define IPC settings for your BEA Tuxedo machine, proceed as follows:

  1. In the Current Resource Default box, click the Use Default IPC Settings check box to clear it.

  2. Click the insert box.

  3. Enter the name of your machine and press Enter.

  4. Click the fields next to the IPC resources you want to set, enter the desired values, and click Apply. Clicking Apply saves the changes in the Registry Table. You must then stop and then restart the tuxipc.exe service for the changes to take effect.

  5. Click OK to close the Control Panel.

You can view the performance of a running BEA Tuxedo server application on the Performance Monitor.

To start the Performance Monitor, click
Start—>Programs—>Administration Tools—>Performance Monitor on the taskbar. The Performance Monitor screen is displayed (
Figure 7-3).

Figure 7-3 BEA Tuxedo Software for Microsoft Windows Performance Monitor


 

 


Creating the UBBCONFIG File and the TUXCONFIG File

For event poster and subscriber applications to communicate with a CORBA object in the BEA Tuxedo domain, in this case the Notification Service, a UBBCONFIG file is required for the Notification Service. The UBBCONFIG file must be written as part of the development of the Notification Service application; otherwise, you will not be able to build and run the application.

After you write the UBBCONFIG file, you use the tmloadcf command to produce the TUXCONFIG file, which is used at run time. Therefore, the TUXCONFIG file must exist before the Notification Service application is started. The TUXCONFIG file is simply a binary version of the UBBCONFIG file. The following is an example of how to use the tmloadcf command:

tmloadcf -y ubb

Before writing the UBBCONFIG, you should list the configuration requirements of your Notification Service application. To list requirements, determine the required servers and processes to support the subscription. Table 7-1 shows the configuration requirements for the different types of subscriptions.

Table 7-1 Configuration Requirements for Transient and Persistent Subscriptions

To support these types of subscriptions

Your UBBCONFIG file must include the following servers, and processes

Transient subscription

TMUSREVT, TMNTS, and TMNTSFWD_T

Persistent subscription

TMUSREVT, TMNTS, TMNTSFWD_P, TMQUEUE, TMQFORWARD


 

If you are using event subscriber applications that use IIOP, you need to configure the IIOP Listener (ISL) command in the UBBCONFIG file with parameters that enable outbound IIOP to invoke callback objects that are not connected to an IIOP Handler (ISH). The -O option (uppercase letter O) of the ISL command enables outbound IIOP. Additional parameters allow system administrators to obtain the optimum configuration for their Notification Service application. For more information about the ISL command, see Setting Up a BEA Tuxedo Application.

When developing a Notification Service application, the SERVERS section of the UBBCONFIG file may include the following types of servers:

The UBBCONFIG file shown in Listing 7-10 is from the Notification Service Introductory sample application. The Introductory sample application supports transient subscriptions only; it does not support persistent subscriptions or data filtering.

Listing 7-10 The Introductory Sample UBBCONFIG File

# This UBBCONFIG file supports transient subscriptions only; it does
# not persistent subscriptions or data filtering.
*RESOURCES
IPCKEY 52359
DOMAINID events_intro_simple_cxx
MASTER SITE1
MODEL SHM
#---------------------------------------------------------------
*MACHINES
"BEANIE"
LMID = SITE1
APPDIR = "D:\tuxdir\EVENTS~1\INTROD~2"
TUXCONFIG = "D:\tuxdir\EVENTS~1\INTROD~2\tuxconfig"
TUXDIR = "d:\tuxdir"
MAXWSCLIENTS = 10
ULOGPFX = "D:\tuxdir\EVENTS~1\INTROD~2\ULOG"
#----------------------------------------------------------------
# Since we are using transient events, the group need not be
# transactional.
*GROUPS
SYS_GRP
LMID = SITE1
GRPNO = 1
#---------------------------------------------------------------
*SERVERS
DEFAULT:
CLOPT = "-A"
TMSYSEVT
SRVGRP = SYS_GRP
SRVID = 1
TMUSREVT
SRVGRP = SYS_GRP
SRVID = 2
TMFFNAME
SRVGRP = SYS_GRP
SRVID = 3
CLOPT = "-A -- -N -M"
TMFFNAME
SRVGRP = SYS_GRP
SRVID = 4
CLOPT = "-A -- -N"
TMFFNAME
SRVGRP = SYS_GRP
SRVID = 5
CLOPT = "-A -- -F"
# Start the notification service server.
#
TMNTS
SRVGRP = SYS_GRP
SRVID = 6
# Start the Notification Service transient event forwarder.
#
TMNTSFWD_T
SRVGRP = SYS_GRP
SRVID = 7
# Start the ISL with -O since we are using callbacks to clients.
ISL
SRVGRP = SYS_GRP
SRVID = 8
CLOPT = "-A -- -O -n //BEANIE:2359"
#---------------------------------------------------------------
*SERVICES

The code example shown in Listing 7-11 is from the Notification Service Advanced sample application. The Advanced sample application supports transient and persistent subscriptions and data filtering.

Listing 7-11 The Advanced Sample UBBCONFIG File

# This UBBCONFIG file supports transient and persistent 
# subscriptions and data filtering.
*RESOURCES
IPCKEY 52363
DOMAINID events_advanced_simple_cxx
MASTER SITE1
MODEL SHM
#---------------------------------------------------------------
*MACHINES
"BEANIE"
LMID = SITE1
APPDIR = "D:\tuxdir\EVENTS~1\ADVANC~1"
TUXCONFIG = "D:\tuxdir\EVENTS~1\ADVANC~1\tuxconfig"
TUXDIR = "d:\tuxdir"
MAXWSCLIENTS = 10
ULOGPFX = "D:\tuxdir\EVENTS~1\ADVANC~1\ULOG"
#
# Since we are using persistent events, we need a transaction log.
#
TLOGDEVICE = "D:\tuxdir\EVENTS~1\ADVANC~1\TLOG"
TLOGSIZE = 10
#---------------------------------------------------------------
*GROUPS
SYS_GRP
LMID = SITE1
GRPNO = 1
# Create a null transactional group for the notification service
# servers.
#
NTS_GRP
LMID = SITE1
GRPNO = 2
TMSNAME = TMS
TMSCOUNT = 2
# Since we are using persistent events, we need a persistent queue
# create a queue transactional group for the queue servers.
#
QUE_GRP
LMID = SITE1
GRPNO = 3
TMSNAME = TMS_QM
TMSCOUNT = 2
#
# Make the queue group manage the QUE space we create.
# The name of the queue space specified here as TMNTSQS must match # the name of the queue space you created.
#
OPENINFO = "TUXEDO/QM:D:\tuxdir\EVENTS~1\ADVANC~1\QUE;TMNTSQS"
#---------------------------------------------------------------
*SERVERS
DEFAULT:
CLOPT = "-A"
#
# Start the queue server.
# The name of the queue space specified in the -s option of
# CLOPT must match the name of the queue space you created.
#
TMQUEUE
SRVGRP = QUE_GRP
SRVID = 1
CLOPT = "-s TMNTSQS:TMQUEUE -- "
#
# Start the queue forwarder, have it forward events to the
# notification service persistent forwarder.
#
TMQFORWARD
SRVGRP = QUE_GRP
SRVID = 2
CLOPT = "-- -i 2 -q TMNTSFWD_P"
TMSYSEVT
SRVGRP = NTS_GRP
SRVID = 1
#
# Start the user EventBroker. Pass in the environment file
# so that the user EventBroker can find the "Story" fml field
# definition. This allows the user EventBroker to perform
# data filtering.
#
TMUSREVT
SRVGRP = NTS_GRP
SRVID = 2
ENVFILE = "D:\tuxdir\EVENTS~1\ADVANC~1\envfile"
TMFFNAME
SRVGRP = SYS_GRP
SRVID = 1
CLOPT = "-A -- -N -M"
TMFFNAME
SRVGRP = SYS_GRP
SRVID = 2
CLOPT = "-A -- -N"
TMFFNAME
SRVGRP = SYS_GRP
SRVID = 3
CLOPT = "-A -- -F"
#
# Start the notification service server. Pass in the environment
# file so that the notification server can perform data filtering.
# The -s option must be specified since we are using
# persistent events. Note that the -s option specifies the name
# of the queue space as TMNTSQS. This name must match the name
# of the queue space you created.
#
TMNTS
SRVGRP = NTS_GRP
SRVID = 3
ENVFILE = "D:\tuxdir\EVENTS~1\ADVANC~1\envfile"
CLOPT = "-A -- -s TMNTSQS"
#
# Start the notification service transient event forwarder.
# Pass in the environment file so that the server can perform
# data filtering.
#
TMNTSFWD_T
SRVGRP = NTS_GRP
SRVID = 4
ENVFILE = "D:\tuxdir\EVENTS~1\ADVANC~1\envfile"
#
# Start the notification service persistent event forwarder.
# Pass in the environment file so that the server can perform
# data filtering.
#
TMNTSFWD_P
SRVGRP = NTS_GRP
SRVID = 5
ENVFILE = "D:\tuxdir\EVENTS~1\ADVANC~1\envfile"
#
# Start the ISL with -O since we're using callbacks to clients.
#
ISL
SRVGRP = SYS_G

 


Managing the Notification Service

After you have deployed the Notification Service application, you may need to perform the following administrative tasks on an on-going basis:

  1. Synchronize databases.

  2. Purge the system of dead subscriptions.

  3. Monitor queue utilization.

  4. Purge the queues of unwanted events.

  5. Move or remove events from the error queue.

Synchronizing Databases

If you configure more than one EventBroker, then your Notification Service subscription databases will have to be synchronized. Because the synchronization process requires time—time that can impact event delivery—and increases network traffic, you should not configure more than one EventBroker unless the event traffic warrants it.

When you configure more than one EventBroker, you can configure time required to synchronize the databases using the -P option on the TMUSREVT server. For more information on how to set this option, see TMUSREVT(5) in the File Formats, Data Descriptions, MIBs, and System Processes Reference.

Note: The time required to synchronize the databases affects the elapsed time from when a subscriber subscribes and when it receives events. It also affects the elapsed time from when a subscriber unsubscribes and when it stops receiving events.

Purging the System of Dead Subscriptions

A subscription dies in one of two ways: (1) the subscriber creates a persistent subscription, shuts down without unsubscribing, and then does not restart and reconnect to the Notification Service, or, (2) the subscriber creates a subscription that never matches any event. While it is allowable for a subscriber to create a persistent subscription and then shut down without unsubscribing, it is an error if the subscriber does not periodically reconnect for the purpose of picking up accumulated events. Because the Notification Service periodically attempts to deliver events that match persistent subscriptions, such events accumulate while the subscriber is disconnected, consume queue space, and waste system resources.

Subscriptions that will never match any events should not be created because they serve no useful purpose. Also, subscriptions consume system resources because each posted event must be compared against each subscription.

Using the ntsadmin commands listed in Table 7-2, you can view all subscriptions and see how many events are currently in the pending queue and in the error queue for each subscription. You can also remove subscriptions using a ntsadmin command or move events from the error queue to the pending queue. For a description of the ntsadmin utility, see ntsadmin.

Table 7-2 ntsadmin Commands Summary

Command

Usage

subscriptions

Lists subscriptions in the subscription database.

rmsubscriptions

Removes subscriptions for the subscription database.

pendevents

Lists information about events in the pending events queue. (For persistent subscriptions only.)

rmpendevents

Removes events in the pending events queue. (For persistent subscriptions only.)

errevents

Lists events in the event error queue. (For persistent subscriptions only.)

rmerrevents

Removes events in the events error queue. (For persistent subscriptions only.)


 

Although there is no way of automatically detecting a dead subscription, the ntsadmin utility is helpful in determining when and if a subscription is dead.

Monitoring Queue Utilization

Queues are created with a fixed amount of space allocated to them. This space is consumed as events accumulate in the queues. If the queues become full, subsequent attempts to enqueue events will fail.

You use qmadmin or ntsadmin to monitor queue utilization (see qmadmin(1) in the BEA Tuxedo Command Reference).

When the queue space was created to hold the pending events, the maximum number of events that could be held by the queue space was specified. For example, in the Advanced sample application, the maximum number of events for the TMNTSQS queue space was set to 200 (see Creating Event Queues). With knowledge of queue space capacity, you can use the ntsadmin pendevents command to determine the number of events pending in the event queue. If the event queue is full or nearly full, you may want to increase the setting for maximum number of events or increase the number of event queues.

Note: Use the threshold command option (cmd) on the qmadmin qcreate command to generate a warning when a queue is nearing capacity. For information on this command, see qmadmin(1) in the BEA Tuxedo Command Reference.

Purging the Queues of Unwanted Events

You can purge events from either the pending queue or the error queue by using the ntsadmin commands rmerrevents and rmpendevents.

Warning: After an event has been removed from the queue there is no way to recover it. The event is gone and the subscribing application will never receive the event.

Managing the Error Queue

After a preset number of attempts to deliver an event, the event is moved to the error queue. Once on the error queue, the administrator must take some action to either purge the event from the system, or move the event from the error queue back to the pending queue. Purging of events is discussed in the previous section.

When you move an event from the error queue back to the pending queue, you are requesting that the system resume delivery attempts of the event. Because failed attempts to deliver events consume system resources, you should not do this unless you have some reason to believe that the condition that prevented delivery before has been corrected. The ntsadmin retryerrevents command is provided specifically to move events back to the pending queue.

 


Notification Service Administration Utility and Commands

This topic includes the following sections:

ntsadmin Utility

This section describes the ntsadmin utility.

ntsadmin

Synopsis

BEA Tuxedo CORBA Notification Service administration command interpreter.

Syntax

ntsadmin

Description

The Notification Service includes an administration command interpreter, ntsadmin, that provides commands to perform the following tasks for CORBA Notification Service applications:

Note: When you enter ntsadmin to start the program, if your application only has transient subscriptions, the commands for persistent subscriptions are disabled.

Note: The Notification Service must be running before you can use ntsadmin.

You can exit the ntsadmin program by entering a q (for quit) at the command prompt. You can terminate the output from a command by pressing the Break key; the program then prompts for a new command.

Output from ntsadmin is paginated according to the pagination command in use (see the paginate command).

Note: The subscription command has different output depending on the setting of the verbose command.

Security

This utility can only be used by the system administrator.

See Also

TMNTS, TMNTSFWD_T, TMNTSFWD_P, qmadmin

ntsadmin Commands

Commands may be entered either by their full name or by an abbreviation (if available, the abbreviation is listed below in parentheses following the full name), followed by appropriate arguments. Arguments that appear in square brackets [] are optional; arguments in curly braces {} indicate a selection from mutually exclusive options. Each command offers the following options:

Option

Definition

[ -i identifier ]

If specified, identifies the subscription that matches identifier.

[ -n name ]

If specified, identifies the subscription(s) with a subscription name that matches name only. To specify names which match the empty string (that is, subscriptions with no name), enclose an empty string between quotes ("").

Note: This option does not support the wildcard character (*) so name must match the subscription name exactly.

[ -t ]

If specified, designates subscriptions with a QoS of transient only.

[ -p ]

If specified, designates subscriptions with a QoS of persistent only.


 

The ntsadmin commands are as follows:

subscriptions (sub) [{-i identifier |-n name |-t | -p}]

Lists subscriptions in the subscription database.

Note: The subscription command has different output depending on whether the verbose mode is on or off (the verbose command is described below). Listing 7-12 shows examples of subscription output with verbose on and off.

Listing 7-12 Subscription Command Output with Verbose Mode On and Off

> verbose on
Verbose mode is now on
> sub
ID: 1000000006
Name: marcello
QoS: Transient
Qspace: <N/A>
Expression: stock trade\.quote
Filter: stock_name %% 'BEAS' && price_per_share > 150
          ID: 1000000005
Name: marcello
QoS: Persistent
Qspace: TMNTSQS
Expression: stock trade\.sell
Filter:
          ID: 1000000004
Name: marcello
QoS: Persistent
Qspace: TMNTSQS
Expression: stock trade\.buy
Filter:
> verbose off
Verbose mode is now off
> sub
ID Name Expression
-- ---- ----------
1000000006 marcello [T] stock trade\.quote
1000000005 marcello [P] stock trade\.sell
1000000004 marcello [P] stock trade\.buy

rmsubscriptions (rmsub) [{-i identifier |-n name |-t | -p]}[-y]

Removes subscriptions from the subscription database. This command prompts for confirmation unless -y is used.

This command displays the number of subscriptions removed.

pendevents (pevt) [{-i identifier |-n name}]

Lists information about events in the pending events queue.

rmpendevents (rmpevt) [{-i identifier |-n name |-o}][-y]

Removes events in the pending events queue. If -o is specified, all events that do not currently have a corresponding subscription in the subscription database will be removed.

This command prompts for confirmation unless -y is used and displays the number of events removed.

errevents (eevt) [{-i identifier |-n name}]

Lists events in the events error queue.

rmerrevents (rmeevt) [{-i identifier |-n name |-o}][-y]

Removes events in the events error queue. If -o is specified, all events that do not currently have a corresponding subscription in the subscription database will be removed.

This command prompts for confirmation unless -y is used and displays the number of events removed.

retryerrevents (reteevt) [{-i identifier |-n name}][-y]

Retries the events in the events error queue. This will move the events from the error queue to the pending queue.

This command prompts for confirmation unless -y is used and displays the number of events moved from the error queue to the pending queue.

quit (q)

Terminates the session.

echo (e) [{off |on}]

Echoes input command lines when set to on. If no input is given, then the current setting is toggled and the new setting is printed. The initial setting is off.

help (h) [{command |all}]

Prints help messages. If command is specified, the abbreviation, arguments and description for that command are printed. all causes a description of the commands to be displayed. Omitting all arguments causes the syntax of all commands to be displayed.

paginate (page) [{off |on}]

Paginates output. If no input is given, the current setting is toggled and the new setting is printed. The initial setting is on, unless either standard input or standard output is a non-terminal device. Pagination may only be turned on when both standard input and standard output are terminal devices. The shell environment variable PAGER may be used to override the default command used for paging output. The default paging command is the pager indigenous to the native operating system environment; for example, the command pg is the default on UNIX operating systems.

verbose (v) [{on | off }]

Produces output in verbose mode. If no option is given then the current setting will be toggled, and the setting is printed. The initial setting is off.

! shellcommand

Use this command to escape to shell and execute shellcommand.

!!

Use this command to repeat the previous shell command.

#[text]

Use this command to designate the line as a comment.

<CR>

Use this command to repeat the previous command.

Using the ntsadmin Utility

This section provides examples of using the ntsadmin utility.

Listing 7-13 shows an example of using ntsadmin to move events from the error queue back to the pending queue. The following steps are performed:

  1. Look up all subscriptions for marcello.

  2. Use the unique subscription_id to display information about events on the error queue.

  3. Move the events from the error queue to the pending queue.

    Listing 7-13 Moving Events from the Error Queue to the Pending Queue

    D:\smith\reg>ntsadmin
    ntsadmin - Copyright (c) 1996-1999 BEA Systems, Inc.
    Portions * Copyright 1986-1997 RSA Data Security, Inc.
    All Rights Reserved.
    Distributed under license by BEA Systems, Inc.
    BEA Tuxedo is a registered trademark.
    INFO: /Q Qspace - TMNTSQS
    INFO: /Q Device - D:\smith\reg\QUE (SITE1)
    > subscriptions -n marcello
    ID Name Expression
    -- ---- ----------
    1000000002 marcello [T] stock trade\.quote
    1000000001 marcello [P] stock trade\.sell
    1000000000 marcello [P] stock trade\.buy
    > verbose off
    Verbose mode is now off
    > eevt -i 1000000003
    ID Name Count
    -- ---- -----
    1000000003 marcello 1
    > reteevt -i 1000000003 -y
    1 event(s) retried

Listing 7-14 shows an example of using ntsadmin to remove subscriptions and purge events.

Listing 7-14 Removing a Subscription

> rmsub -n BillJones -y
2 subscription(s) removed
> rmeevt -n marcello -y
1 event(s) removed
> rmpevt -n BillJones -y
No events removed

Listing 7-15 shows how to check events pending for a specific subscription.

Listing 7-15 Checking for Pending Events

> pevt -n marcello
ID Name Count
-- ---- -----
1000000003 marcello 1

 


Notification Servers

This section provides descriptions of the following servers:

The Notification Service also uses the following BEA Tuxedo system servers. For descriptions of these servers, refer to the File Formats, Data Descriptions, MIBs, and System Processes Reference.

TMNTS

Synopsis

Processes requests for subscriptions and event postings.

Syntax

TMNTS SRVGRP="identifier" SRVID="number"
[CLOPT="[-A] [servopts options]
[--[-S
queuespace]"]

Description

TMNTS is a BEA Tuxedo-provided server that processes all requests for subscriptions and event postings.

Parameter

-S queuespace

The name of the queue space to use. This queue space must contain two queues: TMNTSFWD_P and TMNTSFWD_E. This option is required for persistent subscriptions only.

Note: If you plan to use subscriptions with a QoS of Persistent, you must create a queue space, a queue for holding events, and an error queue before the system is operational. The queue space name must match the queuespace name specified using the CLOPT -S queuespace parameter for the TMNTS server. The event queue must be named TMNTSFWD_P. The error queue must be named TMNTSFWD_E.

It is possible to boot more then one TMNTS server to increase reliability and availability.

The TMNTS server must be part of a transactional group if events will be posted in the context of a transaction.

Interoperability

TMNTS must run on BEA WebLogic Enterprise version 5.0 or later or BEA Tuxedo 8.0 or later.

Notes

The TMNTS server relies on services provided by the TMUSREVT and TMSYSEVT servers. Therefore, these servers must be booted before the system is operational. If transient subscriptions are used, the TMNTSFWD_T server must also be booted before the system is operational. If persistent subscriptions are used, the TMNTSFWD_P, TMQUEUE, and TMQFORWARD servers must also be booted before the system is operational.

Example

*SERVERS
TMNTS SRVGRP = NTS_GRP  SRVID = 3 
CLOPT = "-A -- -s TMNTSQS"

See Also

TMSYSEVT(5), TMUSREVT(5), TMQUEUE(5), TMQFORWARD(5), TMNTSFWD_P, TMNTSFWD_T(5), UBBCONFIG(5)

TMNTSFWD_T

Synopsis

Forwards events to transient subscribers.

Syntax

TMNTSFWD_T SRVGRP="identifier" SRVID="number"
[CLOPT="[-A][--"]

Description

TMNTSFWD_T is a BEA Tuxedo-provided server that forwards events to subscribers who specified a QoS of Transient. There is no transaction context associated with event delivery.

Note: It is possible to boot more then one TMNTSFWD_T server to increase reliability and availability.

Interoperability

TMNTS must run on BEA WebLogic Enterprise version 5.0 or later or BEA Tuxedo 8.0 or later.

Notes

The TMNTSFWD_T server relies on services provided by the TMNTS, TMUSREVT, and TMSYSEVT servers. Therefore, these servers must be booted before the system is operational.

Example

*SERVERS
TMNTSFWD_T  SRVGRP = SYS_GRP  SRVID = 7 

See Also

TMSYSEVT(5), TMUSREVT(5), TMNTS(5), TMNTSFWD_P, UBBCONFIG(5). Also, see IPC Queue Space for Transient Subscriptions.

TMNTSFWD_P

Synopsis

Forwards events to persistent subscribers.

Synopsis

TMNTSFWD_P SRVGRP="identifier" SRVID="number"
CLOPT="[-A] [--"]

Description

TMNTSFWD_P is a BEA Tuxedo-provided server that forwards events to subscribers who specified a QoS of persistent. There is no transaction context associated with event delivery.

It is possible to boot more then one TMNTSFWD_P server to increase reliability and availability.

Interoperability

TMNTS must run on BEA WebLogic Enterprise version 5.0 or later or BEA Tuxedo 8.0 or later.

Notes

The TMNTSFWD_P server relies on services provided by the TMNTS, TMUSREVT, TMSYSEVT, TMQUEUE, and TMQFORWARD servers. Consequently, these servers must be booted before the system is operational.

This server must be booted in a transactional group.

The number of TMNTSFWD_P servers booted should be the same as the number of TMQFORWARD servers booted.

Example

*SERVERS
TMNTSFWD_P  SRVGRP = NTS_GRP  SRVID = 5

See Also

TMSYSEVT(5), TMUSREVT(5), TMNTS, TMNTSFWD_T, servopts(5), UBBCONFIG(5)

 

back to top previous page