Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Java CAPS JMS Reference Java CAPS Documentation |
Implementing JMS in Java CAPS Projects
To Implement JMS Following the Java CAPS Model
Creating and Configuring Message Destinations
Creating OTDs and Collaborations
Database Configuration and Operation
Protected Concurrent Processing
Serial Processing Across a Destination Group
Message Redelivery and Redirection
Specifying Redelivery Options in the JMS IQ Manager
Specifying Redelivery Options in a JMS Client
Example of Producer Throttling and Unthrottling
Additional JMS Message Properties
requestReply(timeout, message)
requestReplyTo(message, destName)
requestReplyTo(timeout, message, destName)
send(message, deliveryMode, priority, timeToLive)
sendBytes(payload, deliveryMode, priority, timeToLive)
sendBytesTo(payload, destination)
sendBytesTo(payload, destination, deliveryMode, priority, timeToLive)
sendText(payload, deliveryMode, priority, timeToLive)
sendTextTo(payload, destination)
sendTextTo(payload, destination, deliveryMode, priority, timeToLive)
sendTo(message, destination, deliveryMode, priority, timeToLive)
retrieveBytesFromMessage(arg0)
retrieveStringFromMessage(arg0)
JMS IQ Manager Runtime Configuration
Accessing the Configuration Properties
Configuration Properties Interface
Journaling and Expiration Properties
Per-Destination Throttling Threshold
Overview of MS Control Utility Features
To Create a Backup Archive File
To Set the MS Control Utility Timeout Period
Message Destination (Queue) Examples
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:
The following topics provide information about the Java CAPS implementation of JMS:
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:
Message-driven beans, which enable the asynchronous consumption of JMS messages
Message send and receive calls that can participate in Java Transaction API transactions
Java EE Connector Architecture (JCA) interfaces that enable JMS implementations from different vendors to be externally plugged into a Java EE 5 application server
Additionally, the Java EE platform’s Enterprise JavaBeans (EJB) container architecture provides the following enhancements the JMS API:
Concurrent consumption of messages
Support for distributed transactions, so that database updates, message processing, and connections to EIS systems using the Java EE Connector Architecture can all participate in the same transaction context
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:
Sun Java System Message Queue
Sun JMS IQ Manager
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.
A message destination is a container for stored data, and can follow either the JMS topic or queue model.
A topic is a message destination that conforms to the publish-and-subscribe messaging paradigm
A queue is a message destination that conforms to the point-to-point messaging paradigm
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 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.
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 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
This section includes the following topics and instructions:
The following diagram illustrates the integration model used by Java CAPS.
Figure 1 Oracle Java CAPS Enterprise Service Bus Integration Model
This model separates the business logic from the physical system used to perform the logical operations at runtime.
Each Project is a logical construct representing a specific business process.
Each Deployment Profile specifies how Projects are deployed to runtime Environments.
Each Environment is a graphical construct representing a physical system in which Projects can run.
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.
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.
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.
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.
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.
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.
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
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