1.How JCA and J2EE compare to EAI products?With that background in mind, let's consider how the current version of the JCA specification -- as well as J2EE in general -- measure up to some of the features found in EAI vendors' products. 2.What is Resource adapters in JCA?Most EAI vendors include proprietary adapters built to work with their products. Most proprietary adapters allow for synchronous and asynchronous communication to an EIS. JCA adapters closely resemble those adapters, except JCA adapters include only a synchronous communication channel. Resource adapters represent the EAI feature JCA most directly matches, although most EAI vendors' adapters offer a larger feature set (for instance asynchronous capability) than JCA adapters. 3.What is Data mapping?With the next EAI feature -- data mapping -- data acquired in one format (for instance in the EIS's native format) by the resource adapter must be transformed into the format required for the business object. Mapping data from one system to another often proves the most time consuming aspect of system integration because you must map each business object in both systems. In response, most EAI vendors provide visual tools to enable a developer to set up such mapping. 4.What is Message broker?Messaging brokers, another feature common to many EAI products, usually enable both point-to-point and publish/subscribe messaging. EAI products often employ messaging as the connectivity layer to tie together disparate systems. 5.What is Workflow?Workflow is the management of business processes. Think of workflow as a coordinator. In and of itself, workflow lacks the capability to do anything, but rather relies on business objects, messages, and other external entities to perform functionality (for example creating a user object in a database). Workflow coordinates the use of business objects, messages, and so on to perform business processes. 6.What is JCA and a general integration strategy?These days, many systems must integrate with other systems. But, what does that mean? In this section, I describe various integration types and where JCA fits into them. Integration falls into two main buckets:
7.What is User interface integration?User interface (UI) integration represents the most coarse-grain type of integration. UI-level integration implies that the data passed between systems will exist in the form of a UI representation. An outbound integration at the UI level entails requesting the UI (most likely a Webpage) from a remote system, then possibly manipulating it before displaying it as if it were part of your system's UI. An inbound integration at the UI level entails allowing an outside system to request UI pages on your system for inclusion on a remote system. 8.What is Message integration?Message-level integration, all the rage with the advent of Web services, implies that the data passed between systems will be in the form of a message (a defined, data-driven text format). An outbound message integration involves requesting data from a remote system in a message form (most likely a SOAP (Simple Object Access Protocol) message). With an inbound integration, your system receives a request for data via a message and responds with a message. 9.What is Object/RPC integration?Object/RPC (remote procedure call) integration implies integrating systems using distributed objects (that is, using EJB calls to integrate). With object-level integration, data passes between systems as parameters to method calls. In an outbound object-level integration, your system invokes objects on remote systems, while in an inbound object-level integration, a remote system calls objects on your system to retrieve data. 10.What is Data integration?Lastly, data-level integration implies that the data passed between systems will be in a data/record-oriented manner. In an outbound data-level integration, your system requests data in a record-oriented fashion from other systems. With an inbound data-level integration, a remote system requests data from your system in a record-oriented manner. 11.What is JCA's structure?Let's begin with a JCA overview. Its main components include the resource adapter, system contracts, and the Common Client Interface (CCI), which together give JCA the power to access data in enterprise systems. 12.What is Resource adapter?In order to use JCA in a J2EE container, you first must have a JCA resource adapter, which resembles a JDBC driver. A JCA adapter is specific to an EIS (for example SAP or PeopleSoft) and is contained in a Resource Adapter Archive (RAR) file composed of the jar files and native libraries necessary to deploy the resource adapter on a J2EE container. A JCA adapter interacts with a J2EE server with system contracts. They enable the J2EE server to propagate the context in which a JCA adapter is being called. You'll find three types of system contracts:
13.What is Connection management contracts?The connection management contract describes the understanding a J2EE container has with the adapter regarding establishing, pooling, and tearing down connections. The connection management contract also allows listeners created on a connection to respond to events (for instance if the connection becomes lost or experiences an error). Also note that the underlying protocol an adapter uses to connect to an EIS is outside the scope of the JCA specification. 14.What is Transaction management contract?The transaction management contract controls transactions in two different ways. First, it allows distributed transactions, which provide a mechanism to propagate transactions that originate from inside an application server to an EIS system. For example, in an EJB, a transaction may be created. If this EJB then employs a JCA resource adapter, the transaction management contract enables the transaction to propagate to the EIS (via the application server invoking the resource adapter's X/Open XA interfaces). In that situation, the transaction manager on the application server would control multiple resources to conduct distributed transaction coordination (i.e., two-phase commit). 15.What is Security contract?The security contract enables the application server to connect to an EIS system using security properties. The application server authenticates with the EIS system by using security properties composed of a principle (a user id) and credentials (a password, a certificate, and so on). An application server can employ two methods to authenticate to an EIS system (via a resource adapter). With the first method, container-managed sign-on, the security credentials configure when the resource adapter is deployed on the application server. You can choose from several ways to configure security properties when using container-managed sign-on. First, with Configured Identity, all resource adapter connections use the same identity when connecting to the EIS system. Second, with Principal Mapping, the principal used when connecting to the EIS system is based on a combination of the current principal in the application server and the mapping (which maps how the principal in the application server will map to a principal in the EIS system). The third is Caller Impersonation, where the principal used in the EIS system exactly matches the principal in the application server. The fourth is Credentials Mapping, which is similar to Caller Impersonation, except the type of credentials must be mapped from application server credentials to EIS credentials. 16.What is CCI?To retrieve and update data, you employ JCA's CCI layer, a procedure resembling using JDBC to call stored procedures. A JCA resource adapter is not required to support the CCI layer (the resource adapter creators can choose their own API set), and, even if the resource adapter does support CCI, it may also support an API specific for that particular adapter. intcount;
try { ConnectionSpec spec =newCciConnectionSpec(user, password); Connection con = cf.getConnection(spec); Interaction ix = con.createInteraction(); CciInteractionSpec iSpec = new CciInteractionSpec(); iSpec.setSchema(user); iSpec.setFunctionName("EMPLOYEECOUNT"); RecordFactory rf =cf.getRecordFactory(); IndexedRecord iRec =rf.createIndexedRecord("InputRecord"); Record rec =ix.execute(iSpec, iRec); Iterator iter =((IndexedRecord)rec).iterator(); while(iter.hasNext()) { Object obj = iter.next(); if(obj instanceof Integer) { count = ((Integer)obj).intValue(); } } con.close(); } catch(Exception e) { e.printStackTrace(); } System.out.println("Employee count is: " + count);... 17.What is Limitations of the JCA 1.0 and its future?The JCA, as its single biggest weakness, lacks an asynchronous communication vehicle. As a consequence, pulling information out of an EIS proves straightforward, but having an EIS send information (for instance data updates) to your system is not currently in the JCA specification. 18.What is Java EE Connector Architecture (JCA) ?(JCA) is a Java-based technology solution for connecting application servers and enterprise information systems (EIS) as part of enterprise application integration (EAI) solutions. While JDBC is specifically used to connect Java EE applications to databases, JCA is a more generic architecture for connection to legacy systems. JCA was developed under the Java Community Process as JSR 16 (JCA 1.0), JSR 112 (JCA 1.5) and JSR 322 (JCA 1.6). 19.What is Contracts?The Java EE Connector Architecture defines a standard for connecting a compliant application server to an EIS. It defines a standard set of system-level contracts between the Java EE application server and a resource adapter. The system contracts defined by Version 1.0 of the Java EE Connector Architecture are described by the specification as follows:
20.What is EIS Integration?JCA adapters can be built to integrate with various Enterprise Information System such as Siebel Systems, SAP AG, Great Plains Systems, Oracle Applications, etc. Siebel provides API to integrate with various platforms like Java, C++, .Net, Visual Basic, etc. For Java it provides an interface called 'Java Data Bean' (JDB). The Siebel adaptor provides data access via the JDB API. Great Plains Systems provides an interface called eConnect to integrate with other platforms. SAP provides an interface for Java called SAP Java Connector (SAP JCo). |