|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.ejb3.pool.ThreadlocalPool
public class ThreadlocalPool
Pools EJBs within a ThreadLocal.
| Field Summary | |
|---|---|
protected WeakThreadLocal<BeanContext> |
currentBeanContext
|
protected Pool |
pool
|
| Constructor Summary | |
|---|---|
ThreadlocalPool()
|
|
| Method Summary | |
|---|---|
protected BeanContext |
create()
|
protected BeanContext |
create(java.lang.Class[] initTypes,
java.lang.Object[] initValues)
|
void |
destroy()
Destroy the pool. |
void |
discard(BeanContext obj)
Discard the bean. |
BeanContext |
get()
Creates if no object is available in pool. |
BeanContext |
get(java.lang.Class[] initTypes,
java.lang.Object[] initValues)
|
int |
getAvailableCount()
|
int |
getCreateCount()
|
int |
getCurrentSize()
|
int |
getMaxSize()
|
int |
getRemoveCount()
|
void |
initialize(Container container,
int maxSize,
long timeout)
|
void |
release(BeanContext ctx)
Put bean back in pool |
void |
remove(BeanContext ctx)
Destroy bean. |
void |
setInjectors(Injector[] injectors)
|
void |
setMaxSize(int maxSize)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Pool pool
protected WeakThreadLocal<BeanContext> currentBeanContext
| Constructor Detail |
|---|
public ThreadlocalPool()
| Method Detail |
|---|
protected BeanContext create()
protected BeanContext create(java.lang.Class[] initTypes,
java.lang.Object[] initValues)
public void discard(BeanContext obj)
Pool
discard in interface Poolpublic void destroy()
Pool
destroy in interface Poolpublic BeanContext get()
Pool
get in interface Pool
public BeanContext get(java.lang.Class[] initTypes,
java.lang.Object[] initValues)
get in interface Pool
public void initialize(Container container,
int maxSize,
long timeout)
initialize in interface Poolpublic void release(BeanContext ctx)
Pool
release in interface Poolpublic void remove(BeanContext ctx)
Pool
remove in interface Poolpublic int getCurrentSize()
getCurrentSize in interface Poolpublic int getAvailableCount()
getAvailableCount in interface Poolpublic int getCreateCount()
getCreateCount in interface Poolpublic int getMaxSize()
getMaxSize in interface Poolpublic int getRemoveCount()
getRemoveCount in interface Poolpublic void setInjectors(Injector[] injectors)
setInjectors in interface Poolpublic void setMaxSize(int maxSize)
setMaxSize in interface Pool
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||