com.sap.mdm.net
Interface ConnectionAccessor

All Known Subinterfaces:
ConnectionPool, SimpleConnection

public interface ConnectionAccessor

This interface represents an accessor to a connection. It is a base interface for obtaining a connection, whether that is from a connection pool or from a single connection itself.

See Also:
ConnectionPool, SimpleConnection

Method Summary
 void releaseConnection(Object owner)
          Releases the connection that was previously reserved.
 Connection reserveConnection(Object owner)
          Reserves a connection for use.
 Connection reserveConnection(Object owner, long timeout)
          Reserves a connection for use.
 

Method Detail

reserveConnection

public Connection reserveConnection(Object owner)
                             throws ConnectionException
Reserves a connection for use. The connection needs to be release by calling releaseConnection(Object). This call waits forever until a connection is available.

Parameters:
owner - the new owner of the connection
Returns:
the connection to the MDM server
Throws:
ConnectionException - if not able to reserve a connection

reserveConnection

public Connection reserveConnection(Object owner,
                                    long timeout)
                             throws ConnectionException
Reserves a connection for use. The connection needs to be release by calling releaseConnection(Object).

Parameters:
owner - the new owner of the connection
timeout - the time to wait when a connection is not immediately available
Returns:
the connection to the MDM server
Throws:
ConnectionException - if not able to reserve a connection

releaseConnection

public void releaseConnection(Object owner)
Releases the connection that was previously reserved.

Parameters:
owner - the owner of the connection


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.