Laying Out Nodes Renaming Nodes Deleting Nodes

6-32 Oracle Complex Event Processing Developers Guide Figure 6–51 EPN After Deleting a Channel Node Figure 6–52 Assembly File After Deleting a Channel Node Note: If a bean or other anonymous element is deleted, then the object containing that object is deleted too. For example, given a bean within a wlevs:listener element, then deleting the bean will delete the listener element too. Part III Part III Building the Oracle CEP Event Processing Network Part III contains the following chapters: ■ Chapter 7, Configuring JMS Adapters ■ Chapter 8, Configuring HTTP Publish-Subscribe Server Adapters ■ Chapter 9, Configuring Channels ■ Chapter 10, Configuring Oracle CQL Processors ■ Chapter 11, Configuring EPL Processors ■ Chapter 12, Configuring Caching ■ Chapter 13, Configuring Event Record and Playback 7 Configuring JMS Adapters 7-1 7 Configuring JMS Adapters This section contains information on the following subjects: ■ Section 7.1, Overview of JMS Adapter Configuration ■ Section 7.2, Configuring a JMS Adapter for a JMS Service Provider ■ Section 7.3, Creating a Custom Converter Between JMS Messages and Event Types ■ Section 7.4, Encrypting Passwords in the JMS Adapter Component Configuration File ■ Section 7.5, Configuring the JMS Adapter EPN Assembly File ■ Section 7.6, Configuring the JMS Adapter Component Configuration File

7.1 Overview of JMS Adapter Configuration

The Oracle CEP JMS adapters support any Java EE compliant JMS service provider that provides a Java client. For more information, see Section 7.1.1, JMS Service Providers . Oracle CEP provides the following Java Message Service JMS adapters that you can use in your event applications to send and receive messages to and from a JMS destination, respectively, without writing any Java code: ■ Section 7.1.2, Inbound JMS Adapter ■ Section 7.1.3, Outbound JMS Adapter For general information about JMS, see Java Message Service on the Sun Developer Network at http:java.sun.comproductsjms .

7.1.1 JMS Service Providers

The Oracle CEP JMS adapters support any Java EE compliant JMS service provider that provides a Java client. This chapter describes how to configure the Oracle CEP JMS inbound and outbound adapters for use with the following JMS service providers: ■ Section 7.2.3, How to Configure a JMS Adapter for Oracle WebLogic Server JMS Manually ■ Section 7.2.4, How to Configure a JMS Adapter for Tibco EMS JMS Manually If your JMS service provider is not in this list, you can still configure Oracle CEP JMS adapters for use with your JMS service provider. Review the procedure in 7-2 Oracle Complex Event Processing Developers Guide Section 7.2.4, How to Configure a JMS Adapter for Tibco EMS JMS Manually as a configuration model, consult your JMS service provider documentation, and adapt this procedure to suit your JMS service provider. For more information, see Section 7.2, Configuring a JMS Adapter for a JMS Service Provider .

7.1.2 Inbound JMS Adapter

The inbound JMS adapter receives messages from a JMS destination and converts them into events. You specify an inbound JMS adapter in the EPN assembly file as follows: ... wlevs:adapter id=myJmsInbound provider=jms-inbound ... wlevs:adapter ... You configure an inbound JMS adapter in its component configuration file as follows: ... jms-adapter namemyJmsInboundname jndi-provider-urlt3:localhost:7001jndi-provider-url destination-jndi-nameQueue1destination-jndi-name userweblogicuser passwordweblogicpassword work-managerJettyWorkManagerwork-manager concurrent-consumers1concurrent-consumers session-transactedfalsesession-transacted jms-adapter ... This section describes: ■ Section 7.1.2.1, Conversion Between JMS Messages and Event Types ■ Section 7.1.2.2, Single and Multi-threaded Inbound JMS Adapters For more information, see: ■ Section 7.5.1, JMS Inbound Adapter EPN Assembly File Configuration ■ Section 7.6.1, JMS Inbound Adapter Component Configuration

7.1.2.1 Conversion Between JMS Messages and Event Types

By default, the inbound JMS adapter can automatically converts JMS messages into events by matching property names with a specified event type if the following is true: ■ You must specify an event type using the jms-adapter element event-type child element in the JMS adapter component configuration file. The JMS adapter converts incoming JMS messages into the Oracle CEP event type this element specifies. ■ JMS messages must be of type MapMessage. For each incoming message, an event of the specified event type is created. For each map element in the incoming message, the adapter looks for a property on the event type and if found, sets the corresponding value. Optionally, you may customize JMS message to event type conversion by writing your own Java class to specify exactly how you want the incoming JMS messages to be Configuring JMS Adapters 7-3 converted into one or more event types. In this case, you do not specify an event type using the jms-adapter element event-type child element in the JMS adapter component configuration file. For more information, see Section 7.3, Creating a Custom Converter Between JMS Messages and Event Types .

7.1.2.2 Single and Multi-threaded Inbound JMS Adapters

By default, an inbound JMS adapter is single-threaded. That is, the inbound JMS adapter uses a single thread to read messages from the JMS destination. When the inbound JMS adapter is single-threaded, event order is guaranteed. To improve scalability, you can configure an inbound JMS adapter to use multiple threads to read messages from the JMS destination. The simplest way to do this is to configure the adapter with a work manager. You can specify a dedicated work manager used only by the adapter or you can share a work manager amongst several components such as other adapters and Jetty. When the inbound JMS adapter is multi-threaded, event order is not guaranteed. For more information, see: ■ work-manager and concurrent-consumers in Table 7–1, jms-adapter Inbound Child Elements ■ Section 22.2.1, EventPartitioner

7.1.3 Outbound JMS Adapter

The outbound JMS adapter sends events to a JMS destination, automatically converting the event into a JMS map message by matching property names with the event type. Typically, you also customize this conversion by writing your own Java class to specify exactly how you want the event types to be converted into outgoing JMS messages. If you do not provide your own converter class, and instead let Oracle CEP take care of the conversion between messages and event types, the following is true: ■ You must specify an event type using the jms-adapter element event-type child element in the JMS adapter component configuration file. The JMS adapter converts incoming JMS messages into the Oracle CEP event type this element specifies. ■ By default, the outbound JMS adapter default converter creates JMS messages of type MapMessage. For each property of the event, a corresponding element is created in the output MapMessage. You specify an outbound JMS adapter in the EPN assembly file as follows: ... wlevs:adapter id=myJmsOutbound provider=jms-outbound ... wlevs:adapter ... You configure an outbound JMS adapter in its component configuration file as follows: ... jms-adapter namemyJmsOutboundname event-typeJMSEventevent-type 7-4 Oracle Complex Event Processing Developers Guide jndi-provider-urlt3:localhost:7001jndi-provider-url destination-jndi-nameTopic1destination-jndi-name delivery-modenonpersistentdelivery-mode jms-adapter ... For more information, see: ■ Section 7.5.2, JMS Outbound Adapter EPN Assembly File Configuration ■ Section 7.6.2, JMS Outbound Adapter Component Configuration ■ Section 7.3, Creating a Custom Converter Between JMS Messages and Event Types.

7.2 Configuring a JMS Adapter for a JMS Service Provider

This section describes how to configure the Oracle CEP JMS inbound and outbound adapters: ■ Section 7.2.1, How to Configure a JMS Adapter Using the Oracle CEP IDE for Eclipse ■ Section 7.2.2, How to Configure a JMS Adapter Manually This section provides examples specific to the following JMS service providers: ■ Section 7.2.3, How to Configure a JMS Adapter for Oracle WebLogic Server JMS Manually ■ Section 7.2.4, How to Configure a JMS Adapter for Tibco EMS JMS Manually If your JMS service provider is not in this list, and your JMS service provider offers a Java client, then you can still configure Oracle CEP JMS adapters for use with your JMS service provider. Review the procedure in Section 7.2.4, How to Configure a JMS Adapter for Tibco EMS JMS Manually as a configuration model, consult your JMS service provider documentation, and adapt this procedure to suit your JMS service provider. For more information, see Section 7.1.1, JMS Service Providers .

7.2.1 How to Configure a JMS Adapter Using the Oracle CEP IDE for Eclipse

The simplest way to create and configure a JMS adapter is using the Oracle CEP IDE for Eclipse adapter wizard. For more information, see Section 6.4.1.2, How to Create an Adapter Node . After using the adapter wizard to create and specify the basic JMS adapter configuration, review Section 7.2.2, How to Configure a JMS Adapter Manually to complete the configuration. Note: In the following sections, it is assumed that you have already created an Oracle CEP application along with its EPN assembly file and component configuration files, and that you want to update the application to use an inbound or outbound JMS adapter. If you have not, refer to Chapter 1, Overview of Creating Oracle CEP Applications for details.