18 Using the Java Message Service Handler
The Java Message Service (JMS) Handler allows operations from a trail file to be formatted in messages, and then published to JMS providers like Oracle Weblogic Server, Websphere, and ActiveMQ.
This chapter describes how to use the JMS Handler.
18.1 Overview
The Java Message Service is a Java API that allows applications to create, send, receive, and read messages. The JMS API defines a common set of interfaces and associated semantics that allow programs written in the Java programming language to communicate with other messaging implementations.
The JMS Handler captures the Oracle GoldenGate trail and sends those messages to the configured JMS providers.
Parent topic: Using the Java Message Service Handler
18.2 Setting Up and Running the JMS Handler
The JMS Handler setup (JNDI configuration) depends on the JMS provider that you use.
The following sections provide instructions for configuring the JMS Handler components and running the handler.
Runtime Prerequisites
The JMS provider should be up and running with the required
ConnectionFactory
and QueueConnectionFactory
and TopicConnectionFactory
configured.
Security
Configure the SSL according to the JMS Provider used.
- Classpath Configuration
Oracle recommends that you store the JMS Handler properties file in the Oracle GoldenGatedirprm
directory. - Java Naming and Directory Interface Configuration
- Handler Configuration
- Sample Configuration Using Oracle WebLogic Server
Parent topic: Using the Java Message Service Handler
18.2.1 Classpath Configuration
Oracle recommends that you store the JMS Handler properties file in the
Oracle GoldenGate dirprm
directory.
The location of the providers client JARs is similar to:
gg.classpath= path_to_the_providers_client_jars
Parent topic: Setting Up and Running the JMS Handler
18.2.2 Java Naming and Directory Interface Configuration
You configure the Java Naming and Directory Interface (JNDI) properties to connect to an Initial Context to look up the connection factory and initial destination.
Table 18-1 JNDI Configuration Properties
Properties | Required/ Optional | Legal Values | Default | Explanation |
---|---|---|---|---|
|
Required |
Valid provider URL with port |
None |
Specifies the URL that the handler uses to look up objects on the server. For
example, |
|
Required |
Initial Context factory class name |
None |
Specifies which initial context factory to use when
creating a new initial context object. For Oracle WebLogic
Server, the value is
|
|
Required |
Valid user name |
None |
Specifies the user name to use. |
|
Required |
Valid password |
None |
Specifies the password for the user. |
Parent topic: Setting Up and Running the JMS Handler
18.2.3 Handler Configuration
You configure the JMS Handler operation using the properties file. These properties are located in the Java Adapter properties file (not in the Replicat properties file).
To enable the selection of the JMS Handler, you must first configure the
handler type by specifying gg.handler.name.type=jms
and the
other JMS properties as follows:
Table 18-2 JMS Handler Configuration Properties
Parent topic: Setting Up and Running the JMS Handler
18.2.4 Sample Configuration Using Oracle WebLogic Server
java.naming.provider.url=t3://localhost:7001
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.security.principal=weblogic
java.naming.security.credentials=Welcome
gg.handler.myjms1.type=jms
gg.handler.myjms1.destination=myq
gg.handler.myjms1.connectionFactory=mycf
gg.handler.myjms1.format=xml
Parent topic: Setting Up and Running the JMS Handler