Interoperability and reusability are key features of SOA architecture.

The Java EE Connector architecture defines a standard architecture for connecting the Java EE platform to heterogeneous EISs. This article presents an XML/RPC adapter using a Scala JCA outbound connector to an IN/AIR legacy system.

JCA and integration

JCA 1.6 p 35 "For enterprise application integration, bi-directional connectivity between enterprise applications and EIS is essential. The Java EE Connector architecture defines standard contracts that allow bi-directional connectivity between enterprise applications and EISs. It also formalizes the relationships, interactions, and the packaging of the integration layer, thus enabling enterprise application integration."

The connector architecture defines a set of scalable, secure, and transactional mechanisms that enable the integration of EISs with application servers and enterprise application.

JCA

Using a UCIP JCA connector rather than using an XML/RPC raw driver lets you:

  1. Hide connection complexity.
  2. Use connection pooling and scalability.
  3. Use a standard adapter that can be deployed with any JEE 6 server from an m x n integration problem to an m + n solution

How?

The use of a JCA resource adapter inside a JEE solution is the same as interacting with a database or queue: protocol communication and wire negotiation… are hidden to the final user.

Two interfaces are presented to a customer:

1) A factory trait:

trait AirConnectorFactory extends Referenceable with Function0[AirConnector]

2) The connector trait:

trait AirConnector {
def fire(elem : Elem) : Option[Elem]
}

As an outbound communication where the resource adapter allows an ESB or EE application server to connect to an IN/AIR node and perform work. All communication is initiated by the application. The Air connector factory should be injected as any resource and used like the following.

@Resource(name="AIR")
var airConnectorFactory : AirConnectorFactory = _

val output = airConnectorFactory().fire(input)
Source code is based on JCA 1.6 specification and hosted on github.