Feeds

Programming message services in Java

Asynchronous interactions seem to be the way of the future

Top 5 reasons to deploy VMware with Tegile

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.

Providing a secure and efficient Helpdesk

More from The Register

next story
Google+ goes TITSUP. But WHO knew? How long? Anyone ... Hello ...
Wobbly Gmail, Contacts, Calendar on the other hand ...
Preview redux: Microsoft ships new Windows 10 build with 7,000 changes
Latest bleeding-edge bits borrow Action Center from Windows Phone
UNIX greybeards threaten Debian fork over systemd plan
'Veteran Unix Admins' fear desktop emphasis is betraying open source
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
Google opens Inbox – email for people too stupid to use email
Print this article out and give it to someone techy if you get stuck
Redmond top man Satya Nadella: 'Microsoft LOVES Linux'
Open-source 'love' fairly runneth over at cloud event
prev story

Whitepapers

Cloud and hybrid-cloud data protection for VMware
Learn how quick and easy it is to configure backups and perform restores for VMware environments.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Three 1TB solid state scorchers up for grabs
Big SSDs can be expensive but think big and think free because you could be the lucky winner of one of three 1TB Samsung SSD 840 EVO drives that we’re giving away worth over £300 apiece.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.