Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source.
   * Copyright 2006, Red Hat Middleware LLC, and individual contributors
   * as indicated by the @author tags. See the copyright.txt file in the
   * distribution for a full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.jboss.resource.connectionmanager;
 
A managed connection pool

Author(s):
David Jencks
Version:
$Revision: 71783 $
 
 public interface ManagedConnectionPool
 {
   
Retrieve the managed connection factory for this pool

Returns:
the managed connection factory
  
Set the connection listener factory

Parameters:
clf the connection event listener factory
 
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
 
    ConnectionListener getConnection(Transaction trackByTransactionSubject subjectConnectionRequestInfo cri)
       throws 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
 
    void returnConnection(ConnectionListener clboolean kill
       throws ResourceException;

   

Returns:
the connection count
 
    int getConnectionCount ();

   

Returns:
the connections in use count
 
    int getInUseConnectionCount();

   

Returns:
the connections created count
 
    int getConnectionCreatedCount();

   

Returns:
the connections destroyed count
 
    int getConnectionDestroyedCount();

   
shutdown the pool
 
    void shutdown();

   

Returns:
the available connections
   long getAvailableConnectionCount();

   

Returns:
the available connections
   int getMaxConnectionsInUseCount();

   
flush the pool
   void flush();

   

Returns:
the native connection statistics of underlying connection.
New to GrepCode? Check out our FAQ X