Educational Consultancy - Java SYS-ED SYSED Computer Education Techniques

Educational Consultancy - Java SYS-ED SYSED Computer Education Techniques

JCA: JEE Connector Architecture

Java Training Sitemap

Submit Java Questions Knowledge Transfer Java Course Schedule
Definition of Service Delivery Medium Web-based Training Services
JCA: JEE Connector Architecture Scalability and Application Development
Operational Challenge Transaction Management JCA: JEE Connector Architecture
JEE Web Application Isolation Qualifying a Training Assignment Best Practices and Guidelines
Copyright Acknowledgement
Operational Challenge

JCA: JEE Connector Architecture is used to develop and maintain enterprise-scale web applications. For this class of application, connecting to one or more external systems is the rule rather than the exception. Organizational enterprise use either JDBC: Java Database Connectivity for data-level access or buy, build, or partner to obtain richer application-level connections. Current adapters are platform-specific and offer varying subsets of application functionality. Each adapter requires the developer to learn a new programming interface. It is not uncommon for adapters to suffer from poor scalability and performance. Complex or poorly documented application APIs are common causes of an inferior interface. JCA defines a set of service contracts that will be available to the adapter at application runtime: connection management, transaction management, and security.

Transaction Management

Two types of transaction management are available in JCA.

  • A transaction manager coordinating the activity of multiple resource managers across a single transaction.

  • A transaction with only a single resource manager, referred to as a local transaction.

A resource adapter also can indicate, through its deployment descriptor, that it does not support transactions. Multiple resource managers participating in the same transaction are supported by the JTA: Java Transaction API XAResource interface. The XAResource interface is a Java mapping of the industry standard XA interface. This allows a transaction manager to manage transactions among multiple resources that support the interface. The ManagedConnection interface contains a method, getXAResource(), which returns an XAResource object. The application server's transaction manager uses this object to manage the transaction.

In order to support local transactions, the ManagedConnection interface provides a getLocalTransaction() method, which returns a LocalTransaction object. The LocalTransaction interface has methods which begin, commit, and roll back a transaction for the underlying EIS: Enterprise Information Systems. In addition, the ManagedConnection must notify its registered ConnectionEventListeners when an application component begins, commits, or rolls back a transaction. The ConnectionEventListener interface provides localTransactionStarted(), localTransactionCommitted(), and localTransactionRolledback() methods.

JCA: JEE Connector Architecture

JCA, the JEE Connector Architecture, is an initiative towards EAI: Enterprise Application Integration. It is a standardized architecture in which JEE components can use plug and play access to EIS. JCA provides a common API and set of services within a consistent JEE environment.

Prior to JCA, custom adapters had to be supported for integrating EIS. The adapters provided native interfaces which were complex to incorporate and limited to a single Enterprise information System. Application programmers had to deal with multiple adapters within the EIS.

The limitations included:

  • Application programming for the EIS was proprietary; there was no generic platform for integration with the open architectures.

  • Custom adapters lacked support for connection management, this meant that connection pooling had to be implemented in code.

  • There was no standard infrastructure to provide a vendor-neutral security and generic transaction support to multiple EIS resource managers.

The JCA transport provides native connectivity between Oracle Service Bus and EIS systems; it allows the systems to interact in the service bus layer and leverage the capabilities and features of OSB. The JCA transport supports request-only and synchronous request/response messaging patterns using SOAP 1.1. The security for JCA uses a JNDI service account during both endpoint validation and run time.

If a static service account is associated with the endpoint during endpoint validation, JNDI lookup against the adapter connection factory is performed using the subject in the static service account.  An anonymous subject is used if the service does not use a service account.  If a static service account is configured on the service, the subject in the service account is used to perform the JNDI lookup against the adapter connection factory. Otherwise, an anonymous subject is used.

JCA business services at run time support static, pass through, and mapping service accounts.

If a service account is configured on a JCA business service, JNDI lookup against the adapter connection factory and the subsequent outbound invocation is performed using the subject in the service account. An anonymous subject is used if the service does not use a service account.

JEE Web Application Isolation

The JEE specification mandates that JEE-compliant application servers partition web applications by assigning them different class loaders. As a result, two web applications cannot directly share resources even though they are in the same JVM instance and share process space. This capability to have multiple applications running independently in the same process space makes the Java platform well suited for developing scalable applications.

Qualifying a Training Assignment

The Java platform and language uses connection adapters to address common architectural problems. JCA are created and published to expose proprietary, legacy services to potential consumers. The services expected and the clients expected communication setup will be clients through the Service End Points. It is standard policy for SYS-ED to review the integration of connection pooling, security identity propagation, and transaction control used at the client organization. This information will then be incorporated into the lesson plan.

Oracle Corporation JCA Adapter for JMS / JMS Adapter enables an Oracle BPEL: Business Process Execution Language process to interact with Java Messaging Service. The JMS architecture uses one client interface to many messaging servers. The JMS model has two messaging domains: point-to-point and publish-subscribe. In the point-to-point domain, messages are exchanged through a queue and each message is delivered to only a single receiver. In the publish-subscribe model, messages are sent to a topic and can be read by multiple subscribed clients.

Industry-specific Tailored Exercises

There are electronic medical record guidelines mandated by the United States government in which a patientís record must be made available to multiple systems throughout the country.1 The JCA can be used for connecting to a UNIX or Linux system supplying the medical records and test information. A JCA connector also can access an Enterprise Information System on a Microsoft Windows and IBM mainframe platform.

Best Practices and Guidelines

JCA introduces two new contracts which allow pluggability of JMS providers with JEE containers.

The Message Inflow contract between a JEE container and a resource adapter allows delivery of asynchronous messages from the EIS to message endpoints located in the application's server through the resource adapter interface. A message endpoint is an MDB deployed in a JEE container to listen using the JCA and is available after the deployment of an application.

The Transaction Inflow contract between a JEE container and a resource adapter allows the resource adapter to propagate transactions initiated by the EIS to the application server. It also provides the ability for transaction recovery whenever required; this allows MDBs and other components through the MDBs to participate in a distributed transaction. It may involve a messaging provider used with the JCA RA: Resource Adapter.

When a JMS connection is used to open/close a connection on every send, there will be performance degradation. The recommended practice is to perform the open one time. The implementation of JCA supports a SOA: service oriented architecture which facilitates loose coupling, flexibility, and extensibility.

Footnote 1:


Copyright Acknowledgement

Java is a registered trademark of Sun Microsystems, Inc. and Oracle America, Inc.