This chapter includes the following sections:
To run the Java message capture application you need the following:
To add the message capture VAM to the Oracle GoldenGate installation, add an Extract and the trail that it will create using GGSCI commands:
ADD EXTRACT jmsvam, VAM ADD EXTTRAIL dirdat/id, EXTRACT jmsvam, MEGABYTES 100
The process name (jmsvam
) can be replaced with any process name that is no more than 8 characters. The trail identifier (id
) can be any two characters.
Note:
Commands to position the Extract, such as BEGIN
or EXTRBA
, are not supported for message capture. The Extract will always resume by reading messages from the end of the message queue.
The Extract parameter file contains the parameters needed to define and invoke the VAM. Sample Extract parameters for communicating with the VAM are shown in the table.
To process JMS messages you must configure the connection to the JMS interface, retrieve and parse the messages in a transaction, write each messages to a trail, commit the transaction, and remove its messages from the queue.
Connectivity to JMS is through a generic JMS interface. Properties can be set to configure the following characteristics of the connection:
Java class path for the JMS client
Name of the JMS queue or topic source destination
Java Naming and Directory Interface (JNDI) connection properties
Connection properties for Initial Context
Connection factory name
Destination name
Security information
JNDI authentication credentials
JMS user name and password
The Extract process that is configured to work with the VAM (such as the jmsvam
in the example) will connect to the message system. when it starts up.
Note:
The Extract may be included in the Manger's AUTORESTART
list so it will automatically be restarted if there are connection problems during processing.
Currently the Oracle GoldenGate for Java message capture adapter supports only JMS text messages.
The connection processing performs the following steps when asked for the next message:
Start a local JMS transaction if one is not already started.
Read a message from the message queue.
If the read fails because no message exists, return an end-of-file message.
Otherwise return the contents of the message.
Once all of the messages that make up a transaction have been successfully retrieved, parsed, and written to the Oracle GoldenGate trail, the local JMS transaction is committed and the messages removed from the queue or topic. If there is an error the local transaction is rolled back leaving the messages in the JMS queue.