Table of Contents Previous Next


Table of Contents

Overview
Introduction
Functional Overview
Figure 1‑1 Notification Service Model
Product Components
CORBA Notification Service API Reference
Introduction
Quality of Service
Persistent Subscriptions
Transient Subscriptions
Obtaining the Channel Factory
Using Transactions
Structured Event Fields, Types, and Filters
Figure 2‑1 Structured Event
Designing Events
Listing 2‑1 Event Design
Creating FML Field Table Files for Events
Listing 2‑2 Data Filtering FML Field Table File
Interoperability with Oracle Tuxedo Applications
Posting Events
Receiving Events
Parameters Used When Creating Subscriptions
subscription_name
subscription_name
domain_type
type_name
data_filter
Listing 2‑3 Data Filtering Requirements
push_consumer
qos (quality of service)
Oracle Simple Events API
Figure 2‑2 Oracle Simple Events Interfaces
TOBJ_SimpleEvents::Channel Interface
Channel::subscribe
CORBA IDL
Parameters
Exceptions
CORBA::BAD_PARAM
CORBA::IMP_LIMIT
CORBA::INV_OBJREF
Description
Return Value
Examples
Channel::unsubscribe
CORBA IDL
Parameter
subscription_id
Exceptions
CORBA::BAD_PARAM
Description
Examples
Channel::push_structured_event
CORBA IDL
Parameter
notification
Exceptions
CORBA_IMP_LIMIT
Description
Examples
Channel::exists
CORBA IDL
Parameter
subscription_id
Exceptions
CORBA::BAD_PARAM
Description
Return Value
Examples
TOBJ_SimpleEvents::ChannelFactory Interface
Channel_Factory::find_channel
CORBA IDL
Parameter
Exceptions
CORBA::BAD_PARAM
Description
Return Value
Examples
CosNotification Service API
Overview of Supported CosNotification Service Classes
Figure 2‑3 Implemented CosNotification Service Classes
Detailed Descriptions of CosNotification Service Classes
CosNotifyFilter::Filter Class
CosNotifyFilter::Filter Class
CosNotifyFilter::Filter::add_constraints
Synopsis
OMG IDL
Exceptions
CosNotifyFilter::InvalidConstraint
CORBA::BAD_PARAM
CORBA_IMP_LIMIT
Description
Return Value
Examples
CosNotifyFilter::Filter::destroy
Synopsis
Synopsis
OMG IDL
Exceptions
CORBA::BAD_PARAM
Description
CosNotifyFilter::FilterFactory Class
CosNotifyFilter::FilterFactory::create_filter
Synopsis
Synopsis
OMG IDL
Exceptions
CosNotifyFilter::InvalidGrammar
Description
Return Value
Examples
CosNotifyChannelAdmin::StructuredProxyPushSupplier Class
CosNotifyChannelAdmin::StructuredProxyPushSupplier:: connect_structured_push_consumer
Synopsis
OMG IDL
Exceptions
CosEventChannelAdmin::TypeError
CORBA::INV_OREF
CORBA::IMP_LIMIT
CORBA::OBJECT_NOT_EXIST
CosEventChannelAdmin::AlreadyConnected
Description
Examples
CosNotifyChannelAdmin::StructuredProxyPushSupplier::set_qos
Synopsis
OMG IDL
Exceptions
UnsupportedQoS
ORBA::IMP_LIMIT
Description
Examples
CosNotifyChannelAdmin::StructuredProxyPushSupplier::add_filter
Synopsis
OMG IDL
Exceptions
CORBA::IMP_LIMIT
CORBA::OBJECT_NOT_EXIST
Description
Return Value
Examples
CosNotifyChannelAdmin::StructuredProxyPushSupplier::get_filter
Synopsis
OMG IDL
Exceptions
CosNotifyChannelAdmin::FilterNotFound
Description
Restrictions
a. Filter object references that are returned from this operation cannot be used in comparison operations.
b. Filter object references returned by this operation can be used by the CosNotifyFilter::Filter::destroy operations but are of little use since they cannot be modified or added to proxy objects.
Return Value
Examples
CosNotifyChannelAdmin::StructuredProxyPushSupplier::disconnect_structured_push_supplier
Synopsis
OMG IDL
Exceptions
CORBA::OBJECT_NOT_EXIST
Description
Examples
CosNotifyChannelAdmin::StructuredProxyPushSupplier::MyType
Synopsis
Synopsis
OMG IDL
Description
CosNotifyChannelAdmin::StructuredProxyPushConsumer Class
CosNotifyChannelAdmin::StructuredProxyPushConsumer::connect_structured_push_supplier
Synopsis
OMG IDL
Exception
CosEventChannelAdmin::AlreadyConnected
Description
Examples
CosNotifyChannelAdmin::StructuredProxyPushConsumer::push_structured_event
Synopsis
OMG IDL
Exceptions
CosEventComm::Disconnected
CORBA::IMP_LIMIT
Descriptions
Examples
CosNotifyChannelAdmin::StructuredProxyPushConsumer::disconnect_structured_push_consumer
Synopsis
OMG IDL
Descriptions
Examples
CosNotifyChannelAdmin::StructuredProxyPushConsumer::MyType
Synopsis
Synopsis
OMG IDL
Description
CosNotifyChannelAdmin::ConsumerAdmin Class
CosNotifyChannelAdmin::ConsumerAdmin::obtain_notification_push_supplier
Synopsis
OMG IDL
Exceptions
CosNotifyChannelAdmin::AdminLimitExceeded
CORBA::IMP_LIMIT
Description
Return Value
Examples
CosNotifyChannelAdmin::ConsumerAdmin::get_proxy_supplier
Synopsis
Synopsis
OMG IDL
Exceptions
CosNotifyChannelAdmin::ProxyNotFound
Descriptions
Return Value
Examples
CosNotifyChannelAdmin::SupplierAdmin Class
CosNotifyChannelAdmin::SupplierAdmin::obtain_notification_push_consumer
Synopsis
Synopsis
OMG IDL
Exceptions
CosNotifyChannelAdmin::AdminLimitExceeded
CORBA::IMP_LIMIT
Description
Return Value
Examples
CosNotifyChannelAdmin::EventChannel Class
CosNotifyChannelAdmin::EventChannel::ConsumerAdmin default_consumer_admin
Synopsis
OMG IDL
Description
Return Value
Examples
CosNotifyChannelAdmin::EventChannel::ConsumerAdmin default_supplier_admin
Synopsis
OMG IDL
Description
Return Value
Examples
CosNotifyChannelAdmin::EventChannel::default_filter_factory
Synopsis
Synopsis
OMG IDL
Description
Return Value
Examples
CosNotifyChannelAdmin::EventChannelFactory Class
CosNotifyChannelAdmin::EventChannelFactory::get_event_channel
Synopsis
Synopsis
OMG IDL
Exceptions
CosNotifyChannelAdmin::ChannelNotFound
Description
Return Value
Examples
CosNotifyComm::StructuredPushConsumer Interface
CosNotifyComm::StructuredPushConsumer::push_structured_event
Synopsis
OMG IDL
Exceptions
CosEventComm::Disconnected
Description
Examples
CosNotifyComm::StructuredPushConsumer::disconnect_structured_push_consumer
Synopsis
OMG IDL
Description
Examples
CosNotifyComm::StructuredPushConsumer::Offer_change
Synopsis
OMG IDL
Exceptions
CosNotifyComm::InvalidEventType
Description
Examples
Exception Minor Codes
Using the Oracle Simple Events API
Development Process
Designing Events
Step 1: Writing an Application to Post Events
Getting the Event Channel
Listing 3‑1 Getting the Event Channel (C++)
Creating and Posting Events
Listing 3‑2 Creating and Posting the Event (C++)
Step 2: Writing an Application to Subscribe to Events
Implementing the CosNotifyComm::StructuredPushConsumer Interface
Listing 3‑3 Sample CosNotifyComm::StructuredPushConsumer Interface Implementation (NewsConsumer_i.h)
Listing 3‑4 Sample CosNotifyComm::StructuredPushConsumer Interface Implementation (NewsConsumer_i.cpp)
Getting the Event Channel
Creating a Callback Object
Listing 3‑5 Sample Code for Creating a Callback Object With Transient Object Reference (Introductory Application Subscriber.cpp)
Creating a Subscription
Listing 3‑6 Creating a Transient Subscription (C++)
Listing 3‑6 Creating a Transient Subscription (C++)
Listing 3‑7 Creating a Persistent Subscription (Advanced Subscriber.cpp)
Threading Considerations for C++ Joint Client/Server Applications
Step 3: Compiling and Running Notification Service Applications
Generating the Client Stub and Skeleton Files
Building and Running Applications
Listing 3‑8 C++ Reporter Application Build and Run Commands (Microsoft Windows)
Listing 3‑9 C++ Subscriber Application Build and Run Commands (Microsoft Windows)
Listing 3‑10 C++ Subscriber Application Build and Run Commands (UNIX)
Using the CosNotification Service API
Development Process
Designing Events
Step 1: Writing an Application to Post Events
Getting the Event Channel
Listing 4‑1 Getting the Event Channel (Reporter.cpp)
Creating and Posting Events
Listing 4‑2 Creating and Posting the Event (Reporter.cpp)
Step 2: Writing an Application to Subscribe to Events
Implementing the CosNotifyComm::StructuredPushConsumer Interface
Listing 4‑3 Sample CosNotifyComm::StructuredPushConsumer Interface Implementation (NewsConsumer_i.h)
Listing 4‑4 Sample CosNotifyComm::StructuredPushConsumer Interface Implementation (NewsConsumer_i.cpp)
Getting the Event Channel, ConsumerAdmin Object, and Filter Factory Object
Listing 4‑5 Getting the Event Channel and ConsumerAdmin and Filter Factory Objects (Subscriber.cpp)
Creating a Callback Object
Listing 4‑6 Sample Code for Creating a Callback Object with Transient Object Reference (Introductory Application Subscriber.cpp)
Creating a Subscription
Listing 4‑7 Creating a Transient Subscription
Step 3: Compiling and Running Notification Service Applications
Generating the Client Stub and Skeleton Files
Compiling and Linking the Application Code
Listing 4‑8 C++ Reporter Application Build and Run Commands
Listing 4‑9 C++ Subscriber Application Build and Run Commands (Microsoft Windows)
Listing 4‑10 C++ Subscriber Application Build and Run Commands (UNIX)
Building the Introductory Sample Application
Overview
Figure 5‑1 Introductory Sample Application Components
Building and Running the Introductory Sample Application
Verifying the Settings of the Environment Variables
Copying the Files for the Introductory Sample Application into a Work Directory
Changing the Protection Attribute on the Files for the Introductory Sample Application
Setting Up the Environment
Building the Introductory Sample Application
Makefile Summary
Executing the Makefile
Starting the Introductory Sample Application
Using the Introductory Sample Application
Using the Subscriber Application to Subscribe to Events
Using the Reporter Application to Post Events
Shutting Down the System and Cleaning Up the Directory
Building the Advanced Sample Application
Overview
Figure 6‑1 Advanced Sample Application Components
Building and Running the Advanced Sample Application
Verifying the Settings of the Environment Variables
Copying the Files for the Advanced Sample Application into a Work Directory
Changing the Protection Attribute on the Files for the Advanced Sample Application
Setting Up the Environment
Building the Advanced Sample Application
Makefile Summary
Executing the Makefile
Starting the Advanced Sample Application
Using the Advanced Sample Application
Using the Subscriber Application to Subscribe to Events
Using the Reporter Application to Post Events
Shutting Down the System and Cleaning Up the Directory
CORBA Notification Service Administration
Introduction
Configuring the Notification Service
Configuring Data Filters
Listing 7‑1 Sample Data Filtering Using the Oracle Simple Events API (C++)
Listing 7‑2 Data Filtering FML Field Table File
Listing 7‑3 Envfile Specification for Data Filtering (envfile) (Microsoft Windows)
Listing 7‑4 Specifying the FML Field Definitions File in the UBBCONFIG File
Setting the Host and Port
Creating a Transaction Log
Listing 7‑5 Creating a Transaction Log (createtlog) (Microsoft Windows)
Creating Event Queues
Determining Space Parameters for Transient and Persistent Subscriptions
IPC Queue Space for Transient Subscriptions
/Q Queue Size Parameter Persistent Subscriptions
a. 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.
b. 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.
c. 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.
d. 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).
e. 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).
Creating a Device on Disk for the Queue Space
Listing 7‑6 Creating a Device on Disk for Queue Space (UNIX)
Configuring a Queue Space
Listing 7‑7 Creating Queue Space
Number of messages in queue space:500
Size of queue space in disk pages:1050
Creating the Queues
Listing 7‑8 Creating Queues
Setting IPC Parameters on Microsoft Windows
Figure 7‑1 Microsoft Windows Control Panel
Figure 7‑2 Oracle Tuxedo Software for Microsoft Windows IPC Resources Control Panel
Figure 7‑3 Oracle Tuxedo Software for Microsoft Windows Performance Monitor
Creating the UBBCONFIG File and the TUXCONFIG File
Listing 7‑9 The Introductory Sample UBBCONFIG File
Listing 7‑10 The Advanced Sample UBBCONFIG File
Managing the Notification Service
Synchronizing Databases
Purging the System of Dead Subscriptions
Monitoring Queue Utilization
Purging the Queues of Unwanted Events
Managing the Error Queue
Notification Service Administration Utility and Commands
ntsadmin Utility
ntsadmin
Synopsis
Syntax
Description
Security
See Also
ntsadmin Commands
subscriptions (sub) [{-i identifier |-n name |-t | -p}]
subscriptions (sub) [{-i identifier |-n name |-t | -p}]
Listing 7‑11 Subscription Command Output with Verbose Mode On and Off
rmsubscriptions (rmsub) [{-i identifier |-n name |-t | -p]}[-y]
pendevents (pevt) [{-i identifier |-n name}]
rmpendevents (rmpevt) [{-i identifier |-n name |-o}][-y]
errevents (eevt) [{-i identifier |-n name}]
rmerrevents (rmeevt) [{-i identifier |-n name |-o}][-y]
retryerrevents (reteevt) [{-i identifier |-n name}][-y]
quit (q)
echo (e) [{off |on}]
help (h) [{command |all}]
paginate (page) [{off |on}]
verbose (v) [{on | off }]
! shellcommand
!!
#[text]
<CR>
Using the ntsadmin Utility
Listing 7‑12 Moving Events from the Error Queue to the Pending Queue
Listing 7‑13 Removing a Subscription
Listing 7‑14 Checking for Pending Events
Notification Servers
TMNTS
Synopsis
Syntax
Description
Parameter
-S queuespace
Interoperability
Notes
Example
See Also
TMNTSFWD_T
Synopsis
Syntax
Description
Interoperability
Notes
Example
See Also
TMNTSFWD_P
Synopsis
Synopsis
Description
Interoperability
Notes
Example
See Also

Copyright © 1994, 2017, Oracle and/or its affiliates. All rights reserved.