Java Reference
In-Depth Information
form and take advantage of services such as Connection, Transaction, and
Security Management.
That said, you can consider using JCA when you want to access an EIS that offers
a Resource Adapter.
JCA in action
Failing to take a concrete example that shows you how to access the list of employ-
ees managed by SAP with a connector (which would be very long), to allow you to
understand the essential features), the following code shows you just an overview of
the use of the JCA API. These include the general principle of the connection, the
possibility of data manipulation, and disconnection.
For those who wish to go further, GlassFish offers a complete example of im-
plementing a connector to access a mail server, and the tutorial available at ht-
tp:// , provides you addi-
tional information.
The following code is a overview of interactions with a resource adapter:
try {
javax.naming.Context ic = new
javax.resource.cci.ConnectionFactory cf =
javax.resource.cci.Connection ctx =
System.out.println("Information about the
result set functionality " + "supported by the
connected EIS : " +ctx.getResultSetInfo());
System.out.println("Metadata about the
connection : " + ctx.getMetaData());
Search WWH ::

Custom Search