Configuring JMX Security Configuring JDBC Security

11 Configuring Jetty for Oracle CEP 11-1 11 Configuring Jetty for Oracle CEP This chapter contains information on the following topics: ■ Section 11.1, Overview of Jetty Support in Oracle Complex Event Processing ■ Section 11.2, Configuring a Jetty Server Instance ■ Section 11.3, Example Jetty Configuration

11.1 Overview of Jetty Support in Oracle Complex Event Processing

Oracle CEP supports Jetty see http:www.mortbay.org as Java Web server to deploy HTTP servlets and static resources. Oracle CEP support for Jetty is based on Version 1.2 the OSGi HTTP Service. This API provides ability to dynamically register and unregister http:java.sun.comproductsservletdocs.html objects with the run time and static resources. This specification requires at minimum version 2.1 of the Java Servlet API. Oracle CEP supports the following features for Jetty: ■ Section 11.1.1, Servlets ■ Section 11.1.2, Network IO Integration ■ Section 11.1.3, Thread Pool Integration ■ Section 11.1.4, Jetty Work Managers For details about configuring Jetty, see Section 11.2, Configuring a Jetty Server Instance.

11.1.1 Servlets

In addition to supporting typical synchronous Java servlets, Oracle CEP supports asynchronous servlets. An asynchronous servlet receives a request, gets a thread and performs some work, and finally releases the thread while waiting for those actions to complete before re-acquiring another thread and sending a response.

11.1.2 Network IO Integration

Oracle CEP uses network IO NetIO to configure the port and listen address of Jetty services. 11-2 Oracle Complex Event Processing Administrators Guide

11.1.3 Thread Pool Integration

Oracle CEP Jetty services use the Oracle CEP Work Manager to provide for scalable thread pooling. See Section 11.3, Example Jetty Configuration.

11.1.4 Jetty Work Managers

Oracle CEP allows you to configure how your application prioritizes the execution of its work. Based on rules you define and by monitoring actual run time performance, you can optimize the performance of your application and maintain service level agreements. You define the rules and constraints for your application by defining a work manager. This section describes: ■ Section 11.1.4.1, Understanding How Oracle CEP Uses Thread Pools ■ Section 11.1.4.2, Understanding Work Manager Configuration For more information, see Section 11.2.3, work-manager Configuration Object.

11.1.4.1 Understanding How Oracle CEP Uses Thread Pools

Oracle CEP uses is a single thread pool, in which all types of work are executed. Oracle CEP prioritizes work based on rules you define, and run-time metrics, including the actual time it takes to execute a request and the rate at which requests are entering and leaving the pool. The common thread pool changes its size automatically to maximize throughput. The queue monitors throughput over time and based on history, determines whether to adjust the thread count. For example, if historical throughput statistics indicate that a higher thread count increased throughput, Oracle CEP increases the thread count. Similarly, if statistics indicate that fewer threads did not reduce throughput, Oracle CEP decreases the thread count.

11.1.4.2 Understanding Work Manager Configuration

Oracle CEP prioritizes work and allocates threads based on an execution model that takes into account defined parameters and run-time performance and throughput. You can configure a set of scheduling guidelines and associate them with one or more applications, or with particular application components. For example, you can associate one set of scheduling guidelines for one application, and another set of guidelines for other applications. At run time, Oracle CEP uses these guidelines to assign pending work and enqueued requests to execution threads. To manage work in your applications, you define one or more of the following work manager components: ■ fairshare—Specifies the average thread-use time required to process requests. Note: Jetty has a built-in capability for multiplexed network IO. However, it does not support multiple protocols on the same port. Note: Jetty provides its own thread pooling capability. However, Oracle recommends using the Oracle CEP self-tuning thread pool to minimize footprint and configuration complexity.