Data access application programming interface support

Applications can access the backend data through the standard J2EE 1.3 defined application programming interfaces (APIs).

The standard APIs do not always provide a complete solution for an application that runs in an appserver. For example, the JDBC programming model sometimes does not completely work with the JCA Specification (even though the JCA architecture has explicitly specified that it integrates with the JDBC programming model). These gaps cause some incompatibility between the JDBC and JCA programming models.

When getting and using shareable connections in a global transaction, it is not valid to change a property on the connection after you obtain it. Changes can unknowingly affect other users who share the same connection.

The JCA Specification supports telling the resource adapter the specific properties settings at the time you request the connection (using the getConnection method) by passing in a ConnectionSpec. The ConnectionSpec contains the necessary connection properties used to get a connection. After you obtain a connection from this environment, your application does not need to alter the properties.

The JDBC programming model does not have the same interface to specify the connection properties. Instead, it gets the connection first, then sets the properties on the connection. In the case of a shareable connection, changing the connection properties impacts all the connections shared with the same physical connection.

WAS provides the following extensions to fill in the gaps between these two specifications.

 

See Also

Resource adapter
Example: Accessing data using IBM extended APIs for connections
Example: Accessing data using IBM extended APIs to share connections between container-managed and bean-managed persistence beans