Conversion Between JMS Messages and Event Types

Configuring JMS Adapters 7-5

7.2.2 How to Configure a JMS Adapter Manually

This section describes how to create and configure a JMS adapter manually. It describes the detailed steps that you may require depending on your JMS adapter application and service provider. The simplest way to create and configure a JMS adapter is using the Oracle CEP IDE for Eclipse adapter wizard as Section 7.2.1, How to Configure a JMS Adapter Using the Oracle CEP IDE for Eclipse describes. After using the adapter wizard to create and specify the basic JMS adapter configuration, review this procedure to complete the configuration. To configure a JMS adapter manually: 1. In the EPN assembly file of the application, add a wlevs:adapter element for each inbound and outbound JMS adapter you want to use in your application. Example 7–1 shows the wlevs:adapter element for a JMS inbound adapter. Example 7–1 wlevs:adapter Element for Inbound Adapter wlevs:adapter id=inboundJmsAdapter1 provider=jms-inbound ... wlevs:adapter See: ■ Section 7.5.1, JMS Inbound Adapter EPN Assembly File Configuration ■ Section 7.5.2, JMS Outbound Adapter EPN Assembly File Configuration

2. In the component configuration file of the application, add a jms-adapter

element for each inbound and outbound JMS adapter you want to use in your application. Example 7–2 shows the jms-adapter element for the JMS inbound adapter in Example 7–1 . Example 7–2 jms-adapter Element for Inbound Adapter jms-adapter nameinboundJmsAdapter1name ... jms-adapter For each jms-adapter element, the name child element must be set to the corresponding wlevs:adapter element id child element. See: ■ Section 7.6.1, JMS Inbound Adapter Component Configuration ■ Section 7.6.2, JMS Outbound Adapter Component Configuration 3. Decide how you want to convert between JMS messages and Oracle CEP event types: a. If you want the JMS adapters to perform automatic conversion, specify an event type using the jms-adapter element event-type child element in the JMS adapter component configuration file. See: – Section 7.6.1, JMS Inbound Adapter Component Configuration – Section 7.6.2, JMS Outbound Adapter Component Configuration 7-6 Oracle Complex Event Processing Developers Guide b. If you want the JMS adapters to perform custom conversion, create a custom converter Java class and register it in the EPN assembly file. See Section 7.3, Creating a Custom Converter Between JMS Messages and Event Types . 4. Configure the jms-adapter elements for your JMS provider as Example 7–3 shows: Example 7–3 jms-adapter Element With Tibco EMS JMS Configuration jms-adapter nameinboundJmsAdapter1name ... jndi-provider-url ... jndi-provider-url jndi-factory ... jndi-factory connection-jndi-name ... connection-jndi-name destination-jndi-name ... destination-jndi-name ... jms-adapter For all options that the Oracle CEP JMS adapters support, see: – Section 7.6.1, JMS Inbound Adapter Component Configuration – Section 7.6.2, JMS Outbound Adapter Component Configuration For specific JMS provider examples, see: ■ 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 For more information, see your JMS service provider documentation. 5. If you specify JMS provider client passwords in the component configuration file, consider encrypting them. See Section 7.4, Encrypting Passwords in the JMS Adapter Component Configuration File . 6. Create a JMS client application library that contains the following: ■ The JMS client JAR files your JMS service provider documentation specifies. ■ If you are using Java Object messages, the Java classes used for messaging need to be packaged in a library bundle. You may include these Java classes in this JMS client JAR application library. For more information, see Section 24.1.3.3, Creating Application Libraries . Note: This JMS client JAR application library must: ■ Export all provider-specific packages. ■ Export the Java classes used for messaging, if applicable. ■ Import javax.jms and javax.naming. The application bundle does not need to export the provider-specific packages. The application bundle must import Java classes used for messaging, if applicable.