11-4 Oracle Complex Event Processing Administrators Guide
■
Section 11.2.5, Developing Servlets for Jetty
■
Section 11.2.6, Web Application Deployment
■
Section 11.3, Example Jetty Configuration
11.2.1 jetty Configuration Object
Use the parameters described in the following table to define a jetty configuration object in your config.xml file.
11.2.2 netio Configuration Object
Use the parameters described in the following table to define a netio configuration object in your config.xml file.
11.2.3 work-manager Configuration Object
Use the parameters described in the following table to define a work-manager configuration object in your config.xml file.
11.2.4 jetty-web-app Configuration Object
Use the following configuration object to define a Web application for use by Jetty:
Table 11–1 Configuration Parameters for the jetty Element
Parameter Type
Description
network-io-name String
The name of the NetIO service used. The NetIO service defines the port the server listens on.
See Section 11.2.2, netio Configuration Object
for details. work-manager-name
String The name of the Work Manager that should be used for thread pooling. If not specified,
the default work manager is used. See
Section 11.2.3, work-manager Configuration Object. scratch-directory
String The name of a directory where temporary files required for web applications, JSPs, and
other types of Web artifacts are kept. debug-enabled
boolean Enable debugging in the Jetty code using the OSGi Log Service.
name String
The name of the jetty server instance.
Table 11–2 Configuration Parameters for the netio Element
Parameter Type
Description
name String
The name of this configuration object. port
int The listening port number.
listen-address String
The address on which an instance of netio service listens for incoming connections.
■
It may be set to a numeric IP address in the a.b.c.d format, or to a host name.
■
If not set, the service listens on all network interfaces. The value of this parameter cannot be validated until the service has started.
Table 11–3 Configuration Parameters for the work-manager Element
Parameter Type
Description
min-threads-constraint Integer
The minimum threads this work manager uses. fairshare
Integer The fairshare value this work manager uses.
max-threads-constraint Integer The maximum threads constraint this work manager uses.
name String The name of this work manager.
Configuring Jetty for Oracle CEP 11-5
11.2.5 Developing Servlets for Jetty
Oracle CEP supports development of servlets for deployment to Jetty by creating a standard Java EE Web Application and configuring it using the
Section 11.2.4, jetty-web-app Configuration Object.
11.2.6 Web Application Deployment
Oracle CEP supports deployments packaged either as WAR files or as exploded WAR files, as described in version 2.4 of the Java Servlet Specification.
You can deploy pre-configured web applications from an exploded directory or WAR file by including them in the server configuration.
Security constraints specified in the standard web.xml file are mapped to the Common Security Services security provider. The Servlet API specifies declarative
role-based security, which means that particular URL patterns can be mapped to security roles.
11.3 Example Jetty Configuration
The following snippet of a config.xml file provides an example Jetty configuration; only Jetty-related configuration information is shown:
Example 11–1 Example Jetty Configuration
config netio
nameJettyNetIOname port9002port
netio work-manager
nameWMname max-threads-constraint64max-threads-constraint
min-threads-constraint3min-threads-constraint work-manager
jetty nameTestJettyname
work-manager-nameWMwork-manager-name network-io-nameJettyNetIOnetwork-io-name
debug-enabledfalsedebug-enabled scratch-directoryJettyWorkscratch-directory
jetty jetty-web-app
Table 11–4 Configuration Parameters for the jetty-web-app Element
Parameter Type
Description
context-path String
The context path where this web app is deployed in the web servers name space. If not set, it defaults to .
scratch-directory String
The location where Jetty stores temporary files for this web app. Overrides the scratch-directory parameter in the
Section 11.2, Configuring a Jetty Server Instance.
path String
A file name that points to the location of the web app on the server. It may be a directory or a WAR file.
jetty-name String
The name of the Jetty service where this web application is deployed. It must match the name of an existing
Section 11.2, Configuring a Jetty Server Instance. name
String The name of this configuration object.