Feeds

Programming message services in Java

Asynchronous interactions seem to be the way of the future

Security and trust: The backbone of doing business over the internet

Lately I seem to be involved increasingly in systems relying on asynchronous interactions for efficient and effective integration. In these cases, the asynchronous behaviour has been implemented using JMS (or Java Message Service) queues, with message driven beans, and with the underlying message server provided by application servers such as WebLogic, WebSphere and JBoss.

As a point to note, "asynchronous" here indicates that the initiating process (the client) returns immediately that a message is sent rather than waiting for the invoked process to complete before returning. This is usually desirable if the invoked process is long running or may require human intervention.

Although JMS has been around for some time, I’ve found that knowledge of how JMS works and its use with EJB3 Message Driven Beans is actually quite limited and I realise that I’ve never actually written a column about JMS before. This Java column therefore looks at what JMS is, how it works, and at the use of queues. It also provides an example of implementing a JSM client and an EJB3 based Message Driven Bean (MDB) to act as the consumer of JMS messages.

Java Message Service

The Java Message Service (more commonly referred to as JMS) is a standard Java Standard Edition API that can be used to access a variety of different message servers. Although the name might suggest otherwise, it’s not of itself a message service, but rather a generic interface to a message server.

In this sense, it’s similar to the JDBC and JNDI, in that it is trying to provide a standardised and unified interface to a variety of disparate vendor specific message servers. In the case of JMS, you use JMS to interface to message services such as IBM’s MQ Series message service, the JBoss MQ messaging system, or Oracle AQ queues etc.

The JMS API is defined within the javax.jms package. This package defines numerous interfaces, only two classes, and a number of exceptions. Before going into further detail about JMS we’ll look at the general concepts behind messaging services.

Security and trust: The backbone of doing business over the internet

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Intel: Hey, enterprises, drop everything and DO HADOOP
Big Data analytics projected to run on more servers than any other app
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Saudi Petroleum chooses Tegile storage solution
A storage solution that addresses company growth and performance for business-critical applications of caseware archive and search along with other key operational systems.
Protecting users from Firesheep and other Sidejacking attacks with SSL
Discussing the vulnerabilities inherent in Wi-Fi networks, and how using TLS/SSL for your entire site will assure security.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.