JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS JMS Reference     Java CAPS Documentation
search filter icon
search icon

Document Information

Java CAPS JMS Reference

Introduction to JMS

JMS and Java CAPS

Java Message Service

JMS Message Servers

JMS Message Destinations

JMS Clients

JMS Object Type Definitions

JMS Library File

Implementing JMS in Java CAPS Projects

Integration Model

To Implement JMS Following the Java CAPS Model

Creating and Configuring Message Destinations

Creating OTDs and Collaborations

Configuring JMS Clients

Configuring Message Servers

Creating Component Mappings

Using the JMS OTD in Collaboration Definitions

Using JMS Messages in Collaboration Definitions

Inside the JMS IQ Manager

JMS Messaging Features

Message Delivery Order

Message Producer Priorities

Distributed Transactions

Security

Runtime Management

JMS IQ Manager Database

Database Files

Database Location

Database Configuration and Operation

Message Processing Order

JMS IQ Manager Delivery Modes

Fully Concurrent Processing

Protected Concurrent Processing

Fully Serialized Processing

Serial Processing Across a Destination Group

JMS Client Delivery Modes

Message Producer Priorities

Message Redelivery and Redirection

Redelivery Options

Progressive Delay

Example 1

Example 2

Delay and Redirect

Example 3

Example 4

Delay and Delete

Example 5

Specifying Redelivery Options in the JMS IQ Manager

Specifying Redelivery Options in a JMS Client

Enqueued Message Properties

Enqueue Time

Sequence Number

Performance Issues

Throttling Producers

Example of Producer Throttling and Unthrottling

JMS Object Type Definitions

Message Types

JMS Message Properties

JMS Message Header Properties

Additional JMS Message Properties

JMS OTD Methods

createBytesMessage()

Description

Parameters

Return Value

Exceptions

createBytesMessage(msg)

Description

Parameters

Return Value

Exceptions

createMapMessage()

Description

Parameters

Return Value

Exceptions

createMessage()

Description

Parameters

Return Value

Exceptions

createMessage(msg)

Description

Parameters

Return Value

Exceptions

createStreamMessage()

Description

Parameters

Return Value

Exceptions

createTextMessage()

Description

Parameters

Return Value

Exceptions

createTextMessage(msg)

Description

Parameters

Return Value

Exceptions

getDeliveryMode()

Description

Parameters

Return Value

Exceptions

getDestination()

Description

Parameters

Return Value

Exceptions

Also Accessible From

getMessageServerURL()

Description

Parameters

Return Value

Exceptions

getPriority()

Description

Parameters

Return Value

Exceptions

getTimeToLive()

Description

Parameters

Return Value

Exceptions

receive(timeout)

Description

Parameters

Return Value

Exceptions

receive(timeout, destination)

Description

Parameters

Return Value

Exceptions

receiveNoWait()

Description

Parameters

Return Value

Exceptions

receiveNoWait(destination)

Description

Parameters

Return Value

Exceptions

requestReply(message)

Description

Parameters

Return Value

Exceptions

requestReply(timeout, message)

Description

Parameters

Return Value

Exceptions

requestReplyTo(message, destName)

Description

Parameters

Return Value

Exceptions

requestReplyTo(timeout, message, destName)

Description

Parameters

Return Value

Exceptions

send(message)

Description

Parameters

Return Value

Exceptions

send(message, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

sendBytes(payload)

Description

Parameters

Return Value

Exceptions

sendBytes(payload, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

sendBytesTo(payload, destination)

Description

Parameters

Return Value

Exceptions

sendBytesTo(payload, destination, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

sendText(payload)

Description

Parameters

Return Value

Exceptions

sendText(payload, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

sendTextTo(payload, destination)

Description

Parameters

Return Value

Exceptions

sendTextTo(payload, destination, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

sendTo(message, destination)

Description

Parameters

Return Value

Exceptions

sendTo(message, destination, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

setDeliveryMode(arg0)

Description

Parameters

Return Value

Exceptions

setDestination(arg0)

Description

Parameters

Return Value

Exceptions

Also Accessible From

setMessageServerURL(arg0)

Description

Parameters

Return Value

Exceptions

setPriority(arg0)

Description

Parameters

Return Value

Exceptions

setTimeToLive(arg0)

Description

Parameters

Return Value

Exceptions

JMS Message Methods

countMapMessage()

Description

Parameters

Return Value

Exceptions

countStreamMessage()

Description

Parameters

Return Value

Exceptions

countUserProperty()

Description

Parameters

Return Value

Exceptions

getBytesMessage()

Description

Parameters

Return Value

Exceptions

getJMSMessageType()

Description

Parameters

Return Value

Exceptions

getMapMessage()

Description

Parameters

Return Value

Exceptions

getMapMessage(arg0)

Description

Parameters

Return Value

Exceptions

getMessageProperties()

Description

Parameters

Return Value

Exceptions

getStreamMessage()

Description

Parameters

Return Value

Exceptions

getStreamMessage(arg0)

Description

Parameters

Return Value

Exceptions

getTextMessage()

Description

Parameters

Return Value

Exceptions

getUserProperty()

Description

Parameters

Return Value

Exceptions

getUserProperty(arg0)

Description

Parameters

Return Value

Exceptions

retrieveBytesFromMessage()

Description

Parameters

Return Value

Exceptions

retrieveBytesFromMessage(arg0)

Description

Parameters

Return Value

Exceptions

retrieveMapMessage(arg0)

Description

Parameters

Return Value

Exceptions

retrieveMapMessageList()

Description

Parameters

Return Value

Exceptions

retrieveStringFromMessage()

Description

Parameters

Return Value

Exceptions

retrieveStringFromMessage(arg0)

Description

Parameters

Return Value

Exceptions

retrieveUserProperty(arg0)

Description

Parameters

Return Value

Exceptions

retrieveUserPropertyList()

Description

Parameters

Return Value

Exceptions

setBytesMessage(arg0)

Description

Parameters

Return Value

Exceptions

setJMSMessageType(arg0)

Description

Parameters

Return Value

Exceptions

setStreamMessage(arg0, arg1)

Description

Parameters

Return Value

Exceptions

setTextMessage(arg0)

Description

Parameters

Return Value

Exceptions

storeMapMessage(arg0, arg1)

Description

Parameters

Return Value

Exceptions

storeUserProperty(arg0, arg1)

Description

Parameters

Return Value

Exceptions

getTimeToWait()

Description

Parameters

Return Value

Exceptions

setTimeToWait(arg0)

Description

Parameters

Return Value

Exceptions

JMS Client Configuration

Categories

Consumers

Action

Allowed Values

Default Value

Concurrency

Default Value

Delay

Allowed Values

Default Value

Durable Subscriber Name

Durability

Allowed Values

Default Value

Message Selector

Move/Delete After N Times

Allowed Values

Default Value

Move to Queue/Topic

Allowed Values

Default Value

Move to Destination Name

Allowed Values

Default Value

Server Session Batch Size

Server Session Pool Size

Allowed Values

Default Value

Producers

Delivery Mode

Default Value

Idle Timeout

Default Value

Maximum Pool Size

Default Value

Maximum Wait Time

Default Value

Priority

Allowed Values

Default Value

Steady Pool Size

Default Value

Transaction Mode

Allowed Values

Default Value

JMS IQ Manager Runtime Configuration

Accessing the Configuration Properties

Configuration Properties Interface

Stable Storage Page

Segment Properties

Data Directory

Default Location

Block Size

Allowed Values

Default Value

Segment Size

Allowed Values

Default Value

Minimum Number of Segments

Allowed Values

Default Value

Maximum Number of Segments

Allowed Values

Default Value

Sync to Disk

Default Condition

Journaling and Expiration Properties

Enable Message Expiration

Maximum Lifetime

Default Value

Enable Journal

Default Condition

Journaling Maximum Lifetime

Default Value

Journal Directory

Allowed Values

Default Value

Messaging Behavior Page

Throttling Properties

Per-Destination Throttling Threshold

Allowed Values

Default Value

Server Throttling Threshold

Allowed Values

Default Value

Throttling Lag

Allowed Values

Default Value

Special FIFO Mode Properties

Fully Serialized Queues

Allowed Values

Protected Concurrent Queues

Allowed Values

FIFO Expiration Time

Default Value

Time Dependency Properties

Allowed Values

Access Control Page

Security Options

Default Condition

Diagnostics Page

Diagnostic Properties

Logging Level

Default Setting

Logging Level of Journaler

Default Condition

Maximum Log File Size

Allowed Values

Default value

Number of Backup Log Files

Allowed Values

Default value

Miscellaneous Page

Enable Alert Option

Default Condition

JMS Provider Management

Overview of MS Control Utility Features

MS Control Utility Details

Flags and Arguments

Syntax

Using the MS Control Utility

To Change Message Contents

To Create a Backup Archive File

To Access an Archive File

To Set the MS Control Utility Timeout Period

To Shut the Server Down

Command/Response Examples

Message Server Example

Message Destination (Queue) Examples

Message Destination (Topic) Examples

Message Examples

Troubleshooting

Timestamp Errors

Index

Introduction to JMS

This topic provides a basic introduction into how the Java Message Service (JMS) is implemented and used in Java CAPS. It includes the following sections:

JMS and Java CAPS

The following topics provide information about the Java CAPS implementation of JMS:

Java Message Service

The Java Message Service is a Java API used for sending and receiving messages. It is vendor-independent, and is used almost universally in enterprise messaging systems such as that included in Java CAPS. JMS provides a standard, currently embodied in the JMS version 1.1 specification, which is an integral part of the Java Enterprise Edition (Java EE) Platform. The features of the JMS version 1.1 specification have been widely adopted in the Java CAPS JMS implementation, as described in this document. The use of JMS allows loosely coupled, reliable, asynchronous interactions among Java EE components and legacy systems capable of messaging.

Version 1.1 of the JMS API includes the following features:

Additionally, the Java EE platform’s Enterprise JavaBeans (EJB) container architecture provides the following enhancements the JMS API:

JMS Message Servers

JMS message servers provide the global messaging protocols, such as the routing and delivery of messages, and connection to the JMS database.

By default, Oracle Java CAPS Enterprise Service Bus contains the following message server options:

The Sun Java System Message Queue is the current default message server for Java CAPS. You can also connect to various JMS servers from Java CAPS projects.

The Sun JMS IQ Manager was the default JMS message server implementation for eGate Integrator, the predecessor to Oracle Java CAPS Enterprise Service Bus. This software is installed automatically if you select Complete when installing from the GUI, or as an option if you use any other installation method. The JMS IQ Manager conforms to the Java Message specification 1.1 and supports both topic (publish-and-subscribe) and queue (point-to-point) messaging styles. Inside the JMS IQ Manager includes information about how the JMS IQ Manager processes messages, in concert with the JMS clients. JMS IQ Manager Runtime Configuration provides detailed information about the JMS IQ Manager property options.

JMS Message Destinations

A message destination is a container for stored data, and can follow either the JMS topic or queue model.

Each message destination has at least two JMS Clients associated with it: a producer client at its input, and a consumer client at (each) output. JMS message destinations are discussed in Developing Java CAPS Projects.

JMS Clients

JMS clients provide the local messaging protocols, such as message persistence and delivery semantics, for messages being propagated between Project components. Together with the JMS message server, they constitute a JMS provider.

JMS clients are of two basic types, producers and consumers, or a combination of both. If associated with a queue, these types become queue senders and receivers, respectively. If associated with a topic, they become topic publishers and subscribers, respectively.

JMS client configuration is discussed in JMS Client Configuration.

JMS Object Type Definitions

The JMS Object Type Definition (OTD) acts as a “wrapper” around a message or connection, allowing Collaborations to read from and write to topics or queues. It indicates to the Collaboration which topic or queue it expects to receive messages from or send messages to, and allows you to build the JMS business rules. The JMS OTD and its properties are discussed in JMS Object Type Definitions. JMS OTD methods are described in JMS OTD Methods and JMS Message Methods.

JMS Library File

JMS methods are contained in the JMS library file. In Java CAPS 6, this file is located in the following path:

…\appserver\domains\domain1\lib\com.stc.jms.stcjms.jar

Implementing JMS in Java CAPS Projects

This section includes the following topics and instructions:

Integration Model

The following diagram illustrates the integration model used by Java CAPS.

Figure 1 Oracle Java CAPS Enterprise Service Bus Integration Model

image:Diagram showing deployment of Projects to runtime Environments.

This model separates the business logic from the physical system used to perform the logical operations at runtime.

In this model, any of the Projects can be deployed to any of the Environments by means of the mapping defined in the Deployment Profiles. The example in the figure shows that the patient admittance Project is already in the production phase and therefore was deployed using the production Deployment Profile. The patient records Project is in the staging phase and was therefore deployed to the staging Environment using the staging Deployment Profile. The insurance billing Project is still being developed and tested, and therefore it is deployed to development and testing by means of the development and testing profiles.

To Implement JMS Following the Java CAPS Model

  1. For each Project, specify the message destinations and configure JMS connections for the business process.
  2. For each Environment, assign message servers to Logical Hosts (domains) and configure the message servers.
  3. For each Project, create a Deployment Profile to associate the message destinations and JMS connections with the message servers.

Creating and Configuring Message Destinations

In a Java CAPS Project, you specify the business logic for the Oracle Java CAPS Enterprise Service Bus implementation. For each of the Project components you specify logical properties; these properties are independent from the physical implementation. For JMS-related components, Projects are where you add and name message destinations, by dragging and dropping topics and queue icons onto the Connectivity Map canvas. See Developing Java CAPS Projects for information.

Creating OTDs and Collaborations

After having added the message destinations, you then create the Object Type Definitions (OTDs) and Collaboration Definitions. For any Java-based Collaboration Definition that reads from or writes to a JMS message destination, you must add the JMS web service. For information on the Java methods used in these Collaboration Definitions, see JMS OTD Methods and JMS Message Methods.

Configuring JMS Clients

Links between message destinations and their subscribers and publishers, display a JMS Client icon. By double-clicking the icon in the Connectivity Map, you can configure local connection properties such as persistent or non-persistent delivery mode, XA, and concurrent processing. Details of the configuration properties for JMS Clients are given in JMS Client Configuration.

Configuring Message Servers

In the runtime Environment, you specify which message servers are used, and which Logical Hosts (domains) they are to run on. Once you add a message server to a domain, you specify the physical configurations for the message server. You can configure global properties for JMS messaging such as the port number, message delivery order, tuning configurations, journaling options, and diagnostic options. Procedures for defining your Environment are described in Creating a Runtime Environment. Details of the configuration properties for the JMS IQ Manager are given in JMS IQ Manager Runtime Configuration.

Creating Component Mappings

When you define a Deployment Profile, you create mappings between Projects and Environments. In the Deployment Profile, you specify which components of the business process are located on which systems in a specific Environment. For the JMS, you specify which message destinations run on a particular message server. Note that inbound and outbound message destinations must be deployed to the same server. For more details, see Deploying Java CAPS Projects.

Using the JMS OTD in Collaboration Definitions

To enable Java based Collaboration Definitions to read from and write to topics or queues, you must add the JMS OTD to the Collaboration Definition. The JMS OTD contains a set of Java methods that are used by the JMS client to manage the JMS session. These methods are accessed by displaying the context menu for the OTD root node, and then choosing Select method to call from the menu. This option displays the method browser, shown in the following figure. You can also drag the node to the mapping area to display the browser.

Figure 2 Java Method Browser

image:Screen capture showing the Java Method Browser dialog.

Using JMS Messages in Collaboration Definitions

To create Java based Collaboration Definitions that implement an existing web service, you must add the JMS receive, receiveWait, or send web service operation to the Collaboration Definition. Each of these operations has a set of Java methods that is available for use with it. These methods are accessed by displaying the context menu for the input or output node, and then choosing Select method to call from the menu. This option displays the method browser, shown in the following figure. You can also drag the node to the mapping area to display the browser.

Figure 3 Java Method Browser

image:Screen capture showing the Java Method Browser dialog.