Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Develop inbound connectors with JCA 1.5

Integrate enterprise information systems with J2EE servers

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

The bidirectional connectivity between a J2EE application and an enterprise information system (EIS) is an essential requirement for enterprise integration. For example, an application component such as a session bean should be able to talk to an EIS to publish or update information. Similarly, the EIS should be able to invoke a method call on the session bean asking for an application process to begin.

Unfortunately, the initial flavors of the J2EE specification failed to address these enterprise integration scenarios; a standard was not available for developing communication protocols between a J2EE application and an EIS. To address this limitation, vendors provided connectivity models specific to their own enterprise information systems and a particular application server. These vendor-specific connectivity models proved futile when the application was ported to a different application server or if the application component talked to a different EIS.

The introduction of the J2EE Connector Architecture (JCA) provided a standard in extending J2EE application servers to integrate with any EIS and opened the doors to a new era in enterprise integration. While the initial offering (version 1.0) of outbound communications was successful, inbound connectivity was not introduced until the 1.5 version.

JCA 1.5 provides an enhanced communication model, where the EIS can initiate and control inbound communications, including security context and transaction propagation. These capabilities are fundamental building blocks for true enterprise application integration, although the standards are complex and at times obtuse with respect to implementation considerations.

In an inbound communication model, all communication is sourced from an EIS via a resource adapter to an application component hosted in a J2EE container. A resource adapter is a software library that enables the communication between an application server and an EIS. It supports bidirectional connectivity. In a nutshell, it receives messages from an EIS and passes it to J2EE application components, usually message-driven beans (MDB).

In this article, we show how inbound connectivity may be elegantly resolved by developing and implementing a resource adapter using JCA. In doing so, the adapter runs in a secure, reliable, and manageable execution environment provided by an application server.

Note: We describe the external behavior required of our EIS; the internal details are beyond this article's focus.

Let's begin by introducing our EIS, which produces trade messages.

Enterprise information system

Consider a market trading system that generates trading messages for two markets: foreign exchange (FX) and money market (MM). From the EIS perspective, two steps are involved:

  • Produce FX and MM trade messages for appropriate locations
  • Expose the location and connection information to the parties interested in receiving them


One of the primary requirements of an EIS is to publish the locations and connection factory information to a JNDI (Java Naming and Directory Interface) store.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comments (1)
Login
Forgot your account info?

Only one instance of an MDB! By Anonymous on November 9, 2009, 9:02 am"To take advantage of MDB's object pooling, create message endpoints for each message in the TradeWorker's run() method". Although I have done so, I have only one...

Reply | Read entire comment

View all comments

Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources