12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

System Contracts<br />

Connection Management<br />

Connections to an EIS are expensive resources to create and destroy. To support<br />

scalable applications, the application <strong>server</strong> needs to be able to pool connections to<br />

the underlying EISs. To simplify application component development, this connection<br />

pooling mechanism needs to be transparent to the components accessing the<br />

underlying EISs.<br />

The Connectors specification supports connection pooling and management,<br />

optimizing application component performance and scalability. The connection<br />

management contract, defined between the application <strong>server</strong> and the Resource<br />

Adapter, provides:<br />

■<br />

■<br />

■<br />

A consistent application development model for connection acquisition for both<br />

managed (n-tier) and non-managed (two-tier) applications.<br />

A framework for the Resource Adapter to provide a standard connection factory and<br />

connection interface based on the Common Client Interface (CCI), opaque to the<br />

implementation for the underlying EIS.<br />

A generic mechanism for providing different quality of services (QoS) advanced<br />

connection pooling, transaction management, security management, error tracing<br />

and logging - for a configured set of Resource Adapters.<br />

■<br />

Support for the application <strong>server</strong> to implement its connection pooling facility.<br />

VisiConnect uses connection management to:<br />

■<br />

Create new connections to an EIS<br />

■<br />

Configure connection factories in the Java Naming and Directory Interface (JNDI)<br />

namespace.<br />

■<br />

Find the right connection to an EIS from an existing set of pooled connections, and<br />

reuse that connection.<br />

■<br />

Hook in <strong>Borland</strong> Enterprise Server's transaction and security services.<br />

The <strong>Borland</strong> Enterprise Server establishes, configures, caches and reuses<br />

connections to the EIS automatically through VisiConnect.<br />

The application component performs a lookup of a Resource Adapter connection<br />

factory in the JNDI namespace, using the connection factory to get a connection to the<br />

underlying EIS. The connection factory delegates the connection creation request to<br />

the VisiConnect connection manager instance. On receiving this request, the<br />

connection manager performs a lookup in the connection pool. If there is no connection<br />

in the pool that can satisfy the connection request, VisiConnect uses the<br />

ManagedConnectionFactory implemented by the Resource Adapter to create a new<br />

physical connection to the underlying EIS. If VisiConnect finds a matching connection<br />

in the pool, it then uses the matching ManagedConnection instance to satisfy the<br />

connection request. If a new ManagedConnection instance is created, the <strong>server</strong> adds the<br />

new ManagedConnection instance to the connection pool.<br />

VisiConnect registers a ConnectionEventListener with the ManagedConnection instance.<br />

This listener enables VisiConnect to receive event notifications related to the state of<br />

the ManagedConnection instance. VisiConnect uses these notifications to manage<br />

connection pooling, transactions, connection cleanup and handle error conditions.<br />

VisiConnect uses the ManagedConnection instance to provide a Connection instance that<br />

acts as an application-level handle to the underlying physical connection, to the<br />

application component. The component in turn uses this handle - and not the<br />

underlying physical connection directly - to access EIS resources.<br />

248 BES Developer’s Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!