org.apache.geronimo.connector.outbound
Class AbstractConnectionManager

java.lang.Object
  extended by org.apache.geronimo.connector.outbound.AbstractConnectionManager
All Implemented Interfaces:
java.io.Serializable, javax.resource.spi.ConnectionManager, javax.resource.spi.LazyAssociatableConnectionManager, ConnectionManagerContainer, PoolingAttributes
Direct Known Subclasses:
GenericConnectionManager

public abstract class AbstractConnectionManager
extends java.lang.Object
implements ConnectionManagerContainer, javax.resource.spi.ConnectionManager, javax.resource.spi.LazyAssociatableConnectionManager, PoolingAttributes

Version:
$Rev: 926676 $ $Date: 2010-03-24 01:29:32 +0800 (Wed, 24 Mar 2010) $
See Also:
Serialized Form

Nested Class Summary
static interface AbstractConnectionManager.Interceptors
           
 
Field Summary
protected  AbstractConnectionManager.Interceptors interceptors
           
 
Constructor Summary
AbstractConnectionManager()
           
AbstractConnectionManager(AbstractConnectionManager.Interceptors interceptors, RecoverableTransactionManager transactionManager, javax.resource.spi.ManagedConnectionFactory mcf, java.lang.String name)
           
 
Method Summary
 java.lang.Object allocateConnection(javax.resource.spi.ManagedConnectionFactory managedConnectionFactory, javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
          in: mcf != null, is a deployed mcf out: useable connection object.
 void associateConnection(java.lang.Object connection, javax.resource.spi.ManagedConnectionFactory managedConnectionFactory, javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
          in: non-null connection object, from non-null mcf.
 java.lang.Object createConnectionFactory()
           
 void doFail()
           
 void doRecovery()
           
 void doStart()
           
 void doStop()
           
 int getBlockingTimeoutMilliseconds()
           
 int getConnectionCount()
           
protected  javax.resource.spi.ConnectionManager getConnectionManager()
           
 int getIdleConnectionCount()
           
 int getIdleTimeoutMinutes()
           
 javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()
           
 int getPartitionCount()
           
 int getPartitionMaxSize()
           
 int getPartitionMinSize()
           
 PoolingSupport getPooling()
           
 void inactiveConnectionClosed(java.lang.Object connection, javax.resource.spi.ManagedConnectionFactory managedConnectionFactory)
           
 void setBlockingTimeoutMilliseconds(int timeoutMilliseconds)
           
 void setIdleTimeoutMinutes(int idleTimeoutMinutes)
           
 void setPartitionMaxSize(int maxSize)
           
 void setPartitionMinSize(int minSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interceptors

protected final transient AbstractConnectionManager.Interceptors interceptors
Constructor Detail

AbstractConnectionManager

public AbstractConnectionManager()

AbstractConnectionManager

public AbstractConnectionManager(AbstractConnectionManager.Interceptors interceptors,
                                 RecoverableTransactionManager transactionManager,
                                 javax.resource.spi.ManagedConnectionFactory mcf,
                                 java.lang.String name)
Method Detail

createConnectionFactory

public java.lang.Object createConnectionFactory()
                                         throws javax.resource.ResourceException
Specified by:
createConnectionFactory in interface ConnectionManagerContainer
Throws:
javax.resource.ResourceException

getConnectionManager

protected javax.resource.spi.ConnectionManager getConnectionManager()

getManagedConnectionFactory

public javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()

doRecovery

public void doRecovery()
Specified by:
doRecovery in interface ConnectionManagerContainer

allocateConnection

public java.lang.Object allocateConnection(javax.resource.spi.ManagedConnectionFactory managedConnectionFactory,
                                           javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
                                    throws javax.resource.ResourceException
in: mcf != null, is a deployed mcf out: useable connection object.

Specified by:
allocateConnection in interface javax.resource.spi.ConnectionManager
Throws:
javax.resource.ResourceException

associateConnection

public void associateConnection(java.lang.Object connection,
                                javax.resource.spi.ManagedConnectionFactory managedConnectionFactory,
                                javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
                         throws javax.resource.ResourceException
in: non-null connection object, from non-null mcf. connection object is not associated with a managed connection out: supplied connection object is assiciated with a non-null ManagedConnection from mcf.

Specified by:
associateConnection in interface javax.resource.spi.LazyAssociatableConnectionManager
Throws:
javax.resource.ResourceException

inactiveConnectionClosed

public void inactiveConnectionClosed(java.lang.Object connection,
                                     javax.resource.spi.ManagedConnectionFactory managedConnectionFactory)
Specified by:
inactiveConnectionClosed in interface javax.resource.spi.LazyAssociatableConnectionManager

getPartitionCount

public int getPartitionCount()
Specified by:
getPartitionCount in interface PoolingAttributes

getPartitionMaxSize

public int getPartitionMaxSize()
Specified by:
getPartitionMaxSize in interface PoolingAttributes

setPartitionMaxSize

public void setPartitionMaxSize(int maxSize)
                         throws java.lang.InterruptedException
Specified by:
setPartitionMaxSize in interface PoolingAttributes
Throws:
java.lang.InterruptedException

getPartitionMinSize

public int getPartitionMinSize()
Specified by:
getPartitionMinSize in interface PoolingAttributes

setPartitionMinSize

public void setPartitionMinSize(int minSize)
Specified by:
setPartitionMinSize in interface PoolingAttributes

getIdleConnectionCount

public int getIdleConnectionCount()
Specified by:
getIdleConnectionCount in interface PoolingAttributes

getConnectionCount

public int getConnectionCount()
Specified by:
getConnectionCount in interface PoolingAttributes

getBlockingTimeoutMilliseconds

public int getBlockingTimeoutMilliseconds()
Specified by:
getBlockingTimeoutMilliseconds in interface PoolingAttributes

setBlockingTimeoutMilliseconds

public void setBlockingTimeoutMilliseconds(int timeoutMilliseconds)
Specified by:
setBlockingTimeoutMilliseconds in interface PoolingAttributes

getIdleTimeoutMinutes

public int getIdleTimeoutMinutes()
Specified by:
getIdleTimeoutMinutes in interface PoolingAttributes

setIdleTimeoutMinutes

public void setIdleTimeoutMinutes(int idleTimeoutMinutes)
Specified by:
setIdleTimeoutMinutes in interface PoolingAttributes

getPooling

public PoolingSupport getPooling()

doStart

public void doStart()
             throws java.lang.Exception
Throws:
java.lang.Exception

doStop

public void doStop()
            throws java.lang.Exception
Throws:
java.lang.Exception

doFail

public void doFail()


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.