org.jboss.ejb3.pool
Class AbstractPool

java.lang.Object
  extended by org.jboss.ejb3.pool.AbstractPool
All Implemented Interfaces:
Pool
Direct Known Subclasses:
InfinitePool, StrictMaxPool

public abstract class AbstractPool
extends Object
implements Pool

The base of all pool implementations.

Version:
$Revision: 77542 $
Author:
Bill Burke, Carlo de Wolf

Field Summary
protected  Container container
           
protected  int createCount
           
protected  Injector[] injectors
           
protected  int removeCount
           
 
Constructor Summary
AbstractPool()
           
 
Method Summary
protected  BeanContext<?> create()
          Deprecated. 
protected  BeanContext<?> create(Class[] initTypes, Object[] initValues)
           
 void discard(BeanContext<?> ctx)
          Discard the bean.
 int getCreateCount()
           
 int getRemoveCount()
           
 void initialize(Container container, int maxSize, long timeout)
           
 void remove(BeanContext ctx)
          Destroy bean.
 void setInjectors(Injector[] injectors)
           
abstract  void setMaxSize(int maxSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.ejb3.pool.Pool
destroy, get, get, getAvailableCount, getCurrentSize, getMaxSize, release
 

Field Detail

injectors

protected Injector[] injectors

container

protected Container container

createCount

protected int createCount

removeCount

protected int removeCount
Constructor Detail

AbstractPool

public AbstractPool()
Method Detail

getCreateCount

public int getCreateCount()
Specified by:
getCreateCount in interface Pool

getRemoveCount

public int getRemoveCount()
Specified by:
getRemoveCount in interface Pool

initialize

public void initialize(Container container,
                       int maxSize,
                       long timeout)
Specified by:
initialize in interface Pool

setMaxSize

public abstract void setMaxSize(int maxSize)
Specified by:
setMaxSize in interface Pool

create

@Deprecated
protected BeanContext<?> create()
Deprecated. 


create

protected BeanContext<?> create(Class[] initTypes,
                                Object[] initValues)

remove

public void remove(BeanContext ctx)
Description copied from interface: Pool
Destroy bean. ejbRemove callback is executed

Specified by:
remove in interface Pool

discard

public void discard(BeanContext<?> ctx)
Description copied from interface: Pool
Discard the bean. Called in different context as remove. If there is a system exception this is called.

Specified by:
discard in interface Pool

setInjectors

public void setInjectors(Injector[] injectors)
Specified by:
setInjectors in interface Pool


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.