JMS Service Providers Outbound JMS Adapter

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. 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. Configuring JMS Adapters 7-7 For a specific JMS provider example, see Section 7.2.4, How to Configure a JMS Adapter for Tibco EMS JMS Manually . 7. Copy the JMS client JAR application library to the appropriate Oracle CEP server application library directory: a. If your bundle is a driver, you must put it in the library extensions directory. See Section 24.1.3.2, Library Extensions Directory . b. If your bundle is not a driver, you may put it in the library directory. See Section 24.1.3.1, Library Directory For more information, see Section 24.3.4, How to Update an Application Library Using Oracle CEP IDE for Eclipse . 8. If you created a custom converter class in step 3, update the MANIFEST.MF file of your application to add the following packages to the Import-Package header: Import-Package: javax.jms,javax.naming, ... ... See Section 4.7.5, How to Import a Package .

7.2.3 How to Configure a JMS Adapter for Oracle WebLogic Server JMS Manually

Oracle CEP includes a WebLogic JMS client. When connecting to Oracle WebLogic server, Oracle CEP uses the T3 client by default. You can use the IIOP WebLogic client by starting Oracle WebLogic Server with the -useIIOP command-line argument. This is a server-wide setting that is independent of the JMS code being used whether it is one of the provided adapters or custom JMS code. It is not possible to mix T3 and IIOP usage within a running Oracle CEP server. For more information, see Section 7.2, Configuring a JMS Adapter for a JMS Service Provider . You can manually configure the built-in JMS inbound and outbound adapter to use the Oracle WebLogic Server JMS 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 JMS adpaters for Oracle WebLogic Server JMS manually: 1. Update the EPN assembly file of the application by adding a wlevs:adapter element for each inbound and outbound JMS adapter you want to use in your application. Example 7–4 shows the wlevs:adapter element for a JMS inbound adapter. Example 7–4 wlevs:adapter Element for Inbound Adapter wlevs:adapter id=inboundJmsAdapter1 provider=jms-inbound ... wlevs:adapter See: