Java Reference
In-Depth Information
Using JMS to integrate with external systems
At the beginning of this chapter, we mentioned that the JCA adaptor handles the commu-
nication between the application server and the HornetQ server.
As a matter of fact, one possible way to perform Enterprise Application Integration
( EAI ) is via Java Connector Architecture ( JCA ), which can be used to drive JMS's in-
bound and outbound connections.
Initially, Java connectors were intended to access legacy transaction servers on mainframes
in a synchronous request/reply mode, and this is how the majority of the connectors
worked in the beginning. The standard is currently evolving toward more asynchronous
and two-way connectivity; this is exactly the case with JMS communication, which is in-
herently asynchronous (but also offers the capability of simulating a synchronous request/
response mode). In the next section, we will show you how to use a Java Resource Adapter
to enable communication between JBoss' HornetQ Messaging system and a standalone in-
stance of the Apache ActiveMQ broker (which can be used, for instance, by a non-Java EE
JMS/JCA integration versus web services
If we are discussing EAI, we cannot help but talk about the difference between web ser-
vices, which is the de facto standard for integrating heterogeneous systems.
One advantage of using the JMS/JCA integration is that it provides support for resource ad-
aptation, which maps the Java EE security, transaction, and communication pooling to the
corresponding EIS technology. This makes this technology fairly attractive, especially if
you are trying to connect some existing, well-consolidated, and homogeneous systems (re-
member that if you are using JMS as the driver, you are bound to a Java-to-Java interac-
On the other hand, if you are planning to connect different business partners (for example,
Java and .NET applications) or simply build a new system from scratch with no clear inter-
actions defined, it would be better to use web services for transport and connection.
We will learn more about web services in Chapter 7 , Adding Web Services to Your Applica-
tions , which should provide you with quite a complete overview of your EAI alternatives.
Search WWH ::

Custom Search