Data Cartridge Name Data Cartridge Application Context
15.1.2 Class Loading
The Oracle Java data cartridge supports the following policies for loading the Java classes that your Oracle CQL queries reference: ■ Section 15.1.2.1, Application Class Space Policy ■ Section 15.1.2.2, No Automatic Import Class Space Policy ■ Section 15.1.2.3, Server Class Space Policy For more information, see: ■ Section 15.1.2.4, Class Loading Example ■ Section 15.1.3, Method Resolution ■ How to Export a Package in the Oracle Complex Event Processing Developers Guide for Eclipse.15.1.2.1 Application Class Space Policy
This is the default class loading policy. In this mode, the Oracle Java data cartridge uses the class-space of the application in scope when searching for a Java class. This is only applicable when a type is specified only by its local name, that is, there is a single identifier, and no other identifiers are being used for its package. That is: select String“foo” … And not: select java.lang.String“foo” … In this case the procedure is as follows: ■ Attempt to load the class defined by the single identifier call it ID1 using the application’s class-space as usual; if this fails then: ■ Verify if the application defines any class within its bundle’s internal class-path whose name matches ID1, independent of the package; if this fails then: ■ Verify if application specifies an Import-Package MANIFEST header statement which in conjunction with ID1 can be used to load a Java class. For an example, see Section 15.1.2.4, Class Loading Example . Note: To simplify Oracle Java data cartridge type names, you can use aliases as Section 2.8.2, Defining Aliases Using the Aliases Element describes. Oracle Java Data Cartridge 15-315.1.2.2 No Automatic Import Class Space Policy
This is an optional class loading policy. To use this policy, you must include the following MANIFEST header entry in your Oracle CEP application: OCEP_JAVA_CARTRIDGE_CLASS_SPACE: APPLICATION_NO_AUTO_IMPORT_CLASS_SPACE This mode is similar to the application class space policy except that Oracle CEP will not attempt to automatically import a package when a package is not specified. For more information, see Section 15.1.2.1, Application Class Space Policy .15.1.2.3 Server Class Space Policy
This is an optional class loading policy. To use this policy, you must include the following MANIFEST header entry in your Oracle CEP application: OCEP_JAVA_CARTRIDGE_CLASS_SPACE: SERVER_CLASS_SPACE In this mode, Oracle CEP still uses the application’s class-space, but Oracle CEP will not attempt to automatically import a package when a package is not specified. an Oracle CQL query can reference any exported Java class, regardless of the application or module that is exporting it. The query can also access all classes visible to the OSGi framework’s parent class-loader, which includes the runtime JDK classes. This means that an Oracle CQL application may contain an Oracle CQL query that references classes defined by other Oracle CEP applications, as long as they are exported. This behavior facilitates the creation of Java-based cartridges whose sole purpose is to provide new Java libraries. For an example, see Section 15.1.2.4, Class Loading Example .15.1.2.4 Class Loading Example
Consider the example that Figure 15–1 shows: application B1 imports package mypackage3 that application B2 exports. Figure 15–1 Example Oracle CEP Applications Table 15–1 summarizes which classes these two different applications can access depending on whether they are running in the application class space or server class space. Note: You may only reference a Java class that is part of the internal class-path of an Oracle CEP application if it is exported, even if a processor within this application defines the Oracle CQL query.Parts
» Oracle Fusion Middleware Online Documentation Library
» Streams and Channels Oracle CEP represents a stream as a channel as
» Channel Schema The event source you connect to a stream determines the
» Querying a Channel Once the event source, channel, and processor are
» Controlling Which Queries Output to a Downstream Channel If you specify more
» Relations Relations and Oracle CEP Tuple Kind Indicator
» Range, Rows, and Slide at Query Start-Up and for Empty Relations The descriptions
» Partition Stream-to-Relation Operators Windows
» Default Stream-to-Relation Operator Stream-to-Relation Operators Windows
» Relation-to-Relation Operators Stream-to-Stream Operators
» Event Sources Event Sources and Event Sinks
» Relational Database Table Event Sources
» Function Table Event Sources
» Pattern Recognition Cache Event Sources Functions
» Data Cartridges Fundamentals of Oracle CQL
» Lexical Conventions Oracle CQL Statements
» Oracle CQL and SQL Standards
» Oracle CEP Visualizer Oracle CEP Tools
» Oracle CQL Built-in Datatypes
» Numeric Values Datatype Comparison Rules
» Date Values Datatype Comparison Rules
» Implicit Datatype Conversion Datatype Conversion
» Explicit Datatype Conversion Datatype Conversion
» SQL Datatype Conversion Datatype Conversion
» Oracle Data Cartridge Datatype Conversion
» User-Defined Function Datatype Conversion
» Integer Literals Numeric Literals
» Floating-Point Literals Numeric Literals
» Text Literals Datetime Literals
» Number Format Models Format Models
» Aliases in the relation_variable Clause
» How to Define a Data Type Alias Using the Aliases Element
» Schema Object Naming Guidelines Schema Object Naming Examples
» ELEMENT_TIME for a System-Timestamped Stream
» Using ELEMENT_TIME With SELECT
» Using ELEMENT_TIME With GROUP BY
» Using ELEMENT_TIME With PATTERN
» What You May Need to Know About Unary and Binary Operators
» What You May Need to Know About Operator Precedence
» Comparison Conditions Oracle Fusion Middleware Online Documentation Library
» Logical Conditions Oracle Fusion Middleware Online Documentation Library
» Range Conditions Oracle Fusion Middleware Online Documentation Library
» Null Conditions Compound Conditions
» Using IN and NOT IN as a Set Operation Using IN and NOT IN as a Membership Condition
» Introduction to Common Oracle CQL DDL Clauses
» Introduction to Oracle CQL Built-In Single-Row Functions
» Built-In Aggregate Functions and the Where, Group By, and Having Clauses
» Introduction to Oracle CQLBuilt-In Single-Row Colt Functions
» double c Oracle Fusion Middleware Online Documentation Library
» Introduction to Oracle CQL Built-In java.lang.Math Functions
» User-Defined Single-Row Functions Types of User-Defined Functions
» How to Implement a User-Defined Single-Row Function
» How to Implement a User-Defined Aggregate Function
» Data Cartridge Name Data Cartridge Application Context
» Oracle CQL Data Cartridge Types
» Application Class Space Policy
» No Automatic Import Class Space Policy Server Class Space Policy
» Class Loading Example Class Loading
» Data Cartridge Name Method Resolution
» How to Query Using the Java API How to Query Using Exported Java Classes
» Data Cartridge Name Understanding Oracle Spatial
» Element Info Array Ordinates and Coordinate Systems and the SDO_SRID
» Geometric Relation Operators Scope
» com.oracle.cep.cartridge.spatial.Geometry Methods
» oracle.spatial.geometry.JGeometry Methods The following JGeometry public
» Datatype Mapping Oracle Spatial Application Context
» How to Access the Geometry Types That the Oracle Spatial Java API Supports
» How to Create a Geometry How to Access Geometry Type Public Methods and Fields
» Data Cartridge Name Understanding the Oracle CEP JDBC Data Cartridge
» Scope Understanding the Oracle CEP JDBC Data Cartridge
» Datatype Mapping Understanding the Oracle CEP JDBC Data Cartridge
» function Element Attributes Defining SQL Statements: function Element
» Multiple Parameter JDBC Cartridge Context Functions Using the Oracle CEP
» Overloading JDBC Cartridge Context Functions Using the Oracle CEP JDBC data
» Using SELECT List Aliases Using the TABLE Clause
» Using a Native CQL Type as a return-component-type
» How to Create an Oracle CQL Query
» Where Clause Query Building Blocks
» MATCH_RECOGNIZE Query Queries
» Relational Database Table Query XMLTable Query
» Function TABLE Query Queries
» Sorting Query Results Queries
» Detecting Differences in Query Results
» Parameterized Queries in Oracle CQL Statements
» The bindings Element Parameterized Queries
» Run-Time Query Naming Lexical Conventions for Parameter Values
» Views and Joins Views and Schemas
» Cache Key First and Simple Equality No Arithmetic Operations on Cache Keys
» Oracle CQL Queries and Oracle Data Cartridges
» MATCH_RECOGNIZE and the WHERE Clause Referencing Singleton and Group Matches
» Running Aggregates and Final Aggregates
» Operating on the Same Correlation Variable Referencing Variables That Have not Been Matched Yet
» Using prev Understanding Pattern Recognition With MATCH_RECOGNIZE
» Functions Over Correlation Variables in the MEASURES Clause
» Pattern Quantifiers and Regular Expressions
» Referencing One Correlation Variable From Another in the DEFINE Clause
» PARTITION BY Clause Oracle Fusion Middleware Online Documentation Library
» ORDER BY Clause ALL MATCHES Clause
» WITHIN Clause Oracle Fusion Middleware Online Documentation Library
» Fixed Duration Non-Event Detection
» Recurring Non-Event Detection DURATION Clause
» INCLUDE TIMER EVENTS Clause SUBSET Clause
» Pattern Detection MATCH_RECOGNIZE Examples
» Pattern Detection With PARTITION BY
Show more