14-6 Oracle Complex Event Processing Administrators Guide
14.3 Configuring an Existing HTTP Publish-Subscribe Server
The following procedure describes how to configure an existing HTTP pub-sub server. See
Section 14.4, Example HTTP Publish-Subscribe Server Configuration for a full
example from the config.xml of a configured HTTP pub-sub server.
To configure an existing HTTP publish-subscribe server: 1.
If the Oracle CEP server is running, stop it. See
Section 1.5.4, Starting and Stopping Oracle CEP Servers .
2.
Using your favorite XML editor, open the Oracle CEP servers config.xml file. This file is located in the DOMAIN_DIRservernameconfig directory, where
DOMAIN_DIR refers to the domain directory and servername refers to the name
of the server, such as oracle_cepuser_ projectsmyDomaindefaultserverconfig.
3.
Search for the http-pubsub element that corresponds to the HTTP pub-sub server you want to configure. For example, the default HTTP pub-sub server is as
follows:
http-pubsub namepubsubname
pathpubsubpath pub-sub-bean
server-config ...
http-pubsub
4.
Update the server-config child element of the pub-sub-bean element which in turn is a child element of http-pubsub with HTTP pub-sub server
configuration as required.
For the full list of possible elements, see Server Configuration XSD Schema: wlevs_server_config.xsd in the Oracle Complex Event Processing Developers Guide
for Eclipse.
The following are the most common configuration options:
■
Add a supported-transport element to specify the transport. The format of this element is as follows:
server-config
supported-transport types
elementlong-pollingelement types
supported-transport
... server-config
Oracle CEP server supports the following transports:
–
long-polling: Using this transport, the client requests information from Oracle CEP server and if Oracle CEP server does not have information
available, it does not reply until it has. When the Oracle CEP server replies, the client typically sends another request immediately.
–
callback-polling: Use this transport for HTTP publish-subscribe applications using a cross domain configuration in which the browser
downloads the page from one Web server including the Javascript code
Configuring HTTP Publish-Subscribe for Oracle CEP 14-7
and connects to another server as an HTTP publish-subscribe client. This is required by the Bayeaux protocol. For more information on the Bayeaux
protocol, see http:svn.xantus.orgshortbustrunkbayeuxbayeux.html
.
■
Add a publish-without-connect-allowed element to specify whether clients can publish messages without having explicitly connected to the HTTP
pub-sub server; valid values are true or false:
server-config ...
publish-without-connect-allowedtruepublish-without-connect-allowed
server-config
■
Add a work-manager element to specify the name of the work manager that delivers messages to clients. The value of this element corresponds to the
value of the name child element of the work-manager you want to assign.
server-config ...
work-managermyWorkManagerwork-manager
server-config For more information, see work-manager in the Oracle Complex Event
Processing Developers Guide for Eclipse.
■
Add a client-timeout-secs element to specify the number of seconds after which the HTTP pub-sub server disconnects a client if the client does has
not sent back a connectreconnect message.
server-config ...
client-timeout-secs600client-timeout-secs
server-config
5.
Save the config.xml file.
6.
Start the Oracle CEP server. See
Section 1.5.4, Starting and Stopping Oracle CEP Servers .
7.
Use Oracle CEP Visualizer to configure or add channels. See:
■
Configuring HTTP Publish-Subscribe Server Channels in the Oracle Complex Event Processing Visualizer Users Guide
8.
Use Oracle CEP Visualizer to configure security for the channels. See:
■
Configuring Security for the HTTP Publish-Subscribe Channels in the Oracle Complex Event Processing Visualizer Users Guide
■
Section 10.8.4, Configuring HTTP Publish-Subscribe Server Channel Security
14.4 Example HTTP Publish-Subscribe Server Configuration
The following snippet of the config.xml file shows the configuration of the default HTTP pub-sub server present in every Oracle CEP server:
?xml version=1.0 encoding=UTF-8 standalone=yes? ns2:config xmlns:ns2=http:www.bea.comnswlevsconfigserver
domain namemyDomainname