JCA

From sheep
Revision as of 21:22, 14 September 2021 by Martin (talk | contribs) (Created page with "Somewhat dated JCA article: http://java.sun.com/j2ee/connector/giga/RPA-112000-00018.htm Current: http://java.sun.com/developer/technicalArticles/J2EE/connectorarch1_5/ Exam...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Somewhat dated JCA article: http://java.sun.com/j2ee/connector/giga/RPA-112000-00018.htm

Current: http://java.sun.com/developer/technicalArticles/J2EE/connectorarch1_5/

Example of inbound messaging: http://www.ibm.com/developerworks/java/library/j-jca1/

Example of usage http://java.sun.com/developer/technicalArticles/J2EE/connectorclient/index.html

Java Connector Architecture

Moves integration issues of connection management, transactions, security to the application server, provides a standard interface CCI for communicating with EIS.

  • Required to support legacy/existing infrastructure add new technologies
  • Helps model and automate processes
  • Enables integration of systems in different divisions that were never written to be integrated

Requirements:

  • scalable
  • secure
  • transactional
  • platform independent - same RA can work on all app servers
  • Supplied as a resource adaptor - rar file

JCA must satisfy three contracts:

  • CCI (actually optional but enables tooling)
  • System level contract for the application server
  • EIS specific interface

System level contract

bold - new in 1.5

  • connection management
  • transaction management
  • security
  • lifecycle - notification of start up and shut down
  • message inflow - to support asynchronous messages
  • work management - allows resource adaptor to submit work to appserver
  • transaction inflow - allows application server to be part of external transaction
lifecycle management

must be supported - must offer java bean with start(BootStrapContext ctx) and stop() methods

work management

optional

  • allows the adaptor to appserver
  • Submit an implementation of the Work interface to the WorkManager (as found in the BootStrapContext) of the app server
  • run() method like thread + release() method for clean up code
work listener

optional

  • receives updates about work submitted


message inflow
  • allows both synchronous and asynchronous inbound communication
  • Must implement ResourceAdaptor and ActivationSpec interfaces
  • ResourceAdaptor - activate/deactivate endpoints
    • activation includes a MessageEndpointFactory parameter for creating endpoints within the app server - on receiving a message


transaction inflow

CCI

Common Client Interface

http://java.sun.com/developer/technicalArticles/J2EE/connectorclient/index.html

  • Common client API to access different systems
  • defines things such as transactions, getting a connection, sending/receiving data (records)

Background

EAI

Enterprise Architecture Integration

  • standard methodology for applications and data sources to communicate
  • designed to solve heterogeneous environment problems

Web

EAI driven by web requirements and technologies


What is an EIS

Enterprise information system

  • Bespoke enterprise applications
    • Typically developed in a different language
  • ERP Enterprise Resource Planning
    • Production control, inventory management, HR
  • Mainframe transaction processing systems
  • Databases - data critical to the enterprise

EIS problems

  • Transaction support
    • do they support two phase commit - allowing integration and distributed transactions
  • Technology limitations - administration
  • Integration - specific technology
  • Level of abstraction

Problems solved by JCA

  • Complexity of transaction support
  • Vendor specific API - need to learn new interface each time
  • Scalability - pooling

Types of adaptor

  • synchronous
  • asynchronous - considered loosely coupled
    • scale well
    • increased complexity
    • may loose security/transaction context


JMS may be used as part of the solution when integrating.

Historically JCA 1.0 only supported synchronous adaptors so JMS was used to create an asynchronous mechanism JCA 1.5 now supports asynchronous adaptors

JEE 5.0 requires JCA 1.5 support JCA 2.0 will include ability to plug in JMS providers, XML support in the CCI, metadata support in the CCI - auto discovery