org.jboss.jca.core.connectionmanager.pool.api
Interface Pool

All Superinterfaces:
org.jboss.jca.core.api.connectionmanager.pool.Pool
All Known Subinterfaces:
PrefillPool
All Known Implementing Classes:
AbstractPrefillPool, OnePool, PoolBySubject

public interface Pool
extends org.jboss.jca.core.api.connectionmanager.pool.Pool

A pool.

Author:
Gurkan Erdogdu, David Jencks, Jesper Pedersen

Method Summary
 void emptyManagedConnectionPool(ManagedConnectionPool pool)
          Remove the matching managed connection pool if the pool is empty
 ConnectionListener getConnection(Transaction trackByTransaction, Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          Get a connection
 CoreLogger getLogger()
          Get the logger
 javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()
          Retrieve the managed connection factory for this pool.
 void returnConnection(ConnectionListener cl, boolean kill)
          Return a connection
 void setConnectionListenerFactory(ConnectionListenerFactory clf)
          Set the connection listener factory.
 void setName(String poolName)
          Sets pool name.
 void shutdown()
          Shutdown the pool
 
Methods inherited from interface org.jboss.jca.core.api.connectionmanager.pool.Pool
flush, flush, getName, getStatistics, testConnection
 

Method Detail

setName

void setName(String poolName)
Sets pool name.

Parameters:
poolName - pool name

getManagedConnectionFactory

javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()
Retrieve the managed connection factory for this pool.

Returns:
the managed connection factory

setConnectionListenerFactory

void setConnectionListenerFactory(ConnectionListenerFactory clf)
Set the connection listener factory.

Parameters:
clf - the connection event listener factory

getConnection

ConnectionListener getConnection(Transaction trackByTransaction,
                                 Subject subject,
                                 javax.resource.spi.ConnectionRequestInfo cri)
                                 throws javax.resource.ResourceException
Get a connection

Parameters:
trackByTransaction - for transaction stickiness
subject - the subject for connection
cri - the connection request information
Returns:
a connection event listener wrapping the connection
Throws:
javax.resource.ResourceException - for any error

returnConnection

void returnConnection(ConnectionListener cl,
                      boolean kill)
                      throws javax.resource.ResourceException
Return a connection

Parameters:
cl - the connection event listener wrapping the connection
kill - whether to destroy the managed connection
Throws:
javax.resource.ResourceException - for any error

shutdown

void shutdown()
Shutdown the pool


emptyManagedConnectionPool

void emptyManagedConnectionPool(ManagedConnectionPool pool)
Remove the matching managed connection pool if the pool is empty

Parameters:
pool - The pool

getLogger

CoreLogger getLogger()
Get the logger

Returns:
The value


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)