org.apache.geronimo.connector.outbound
Class SinglePoolConnectionInterceptor

java.lang.Object
  extended byorg.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor
All Implemented Interfaces:
ConnectionInterceptor

public class SinglePoolConnectionInterceptor
extends Object
implements ConnectionInterceptor

SinglePoolConnectionInterceptor chooses a single connection from the pool. If selectOneAssumeMatch is true, it simply returns the selected connection. THIS SHOULD BE USED ONLY IF MAXIMUM SPEED IS ESSENTIAL AND YOU HAVE THOROUGLY CHECKED THAT MATCHING WOULD SUCCEED ON THE SELECTED CONNECTION. (i.e., read the docs on your connector to find out how matching works) If selectOneAssumeMatch is false, it checks with the ManagedConnectionFactory that the selected connection does match before returning it: if not it throws an exception.

Version:
$Revision: 1.6 $ $Date: 2004/05/24 19:10:34 $

Constructor Summary
SinglePoolConnectionInterceptor(ConnectionInterceptor next, int maxSize, int blockingTimeout, boolean selectOneAssumeMatch)
           
 
Method Summary
 void getConnection(ConnectionInfo connectionInfo)
           
 void returnConnection(ConnectionInfo connectionInfo, ConnectionReturnAction connectionReturnAction)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SinglePoolConnectionInterceptor

public SinglePoolConnectionInterceptor(ConnectionInterceptor next,
                                       int maxSize,
                                       int blockingTimeout,
                                       boolean selectOneAssumeMatch)
Method Detail

getConnection

public void getConnection(ConnectionInfo connectionInfo)
                   throws javax.resource.ResourceException
Specified by:
getConnection in interface ConnectionInterceptor
Throws:
javax.resource.ResourceException

returnConnection

public void returnConnection(ConnectionInfo connectionInfo,
                             ConnectionReturnAction connectionReturnAction)
Specified by:
returnConnection in interface ConnectionInterceptor


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.