|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.huihoo.jfox.system.ComponentSupport
org.jfox.ejb.StatelessSessionBeanObjectPool
| Field Summary |
| Fields inherited from class org.huihoo.jfox.system.ComponentSupport |
logger, name, proxyInstance, sequence, state |
| Constructor Summary | |
StatelessSessionBeanObjectPool(StatelessSessionBucket bucket,
ObjectFactory factory)
|
|
| Method Summary | |
void |
clear()
Clears any objects sitting idle in the pool, releasing any associated resources |
PoolableObject |
createObject(org.jfox.ejb.StatelessSessionBeanFreshFlag fresh)
|
protected void |
doDestroy()
do actually destory action |
protected void |
doInit()
do actually create action |
java.lang.String |
getObjectClass()
get the pooled object's class type, it return by object pool's factory |
ObjectFactory |
getObjectFactory()
get the factory use to create new instances |
int |
getRest()
get the count of rest object |
int |
getWorking()
get the count of working object |
static void |
main(java.lang.String[] args)
|
boolean |
removeObject(PoolableObject obj)
如果池中对象小于 max, 存到池中,池满,则调用 ejbRemove,并返回上级池 |
boolean |
restoreObject(PoolableObject obj)
如果数目过多,则返回给 pool,但是先得调用 ejbRemove,释放资源 |
PoolableObject |
retrieveObject()
retrieve Object from object pool |
| Methods inherited from class org.huihoo.jfox.system.ComponentSupport |
destroy, getLogger, getName, getState, init, parseName, setLogger, setName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StatelessSessionBeanObjectPool(StatelessSessionBucket bucket,
ObjectFactory factory)
| Method Detail |
public PoolableObject createObject(org.jfox.ejb.StatelessSessionBeanFreshFlag fresh)
throws java.lang.Exception
fresh - out 参数,false 为从池中直接返回的对象,true 为新生的对象,新生的对象需要调用 setContext,ejbCreate
java.lang.Exception
public PoolableObject retrieveObject()
throws java.lang.Exception
ObjectPool
retrieveObject in interface ObjectPooljava.lang.Exceptionpublic boolean restoreObject(PoolableObject obj)
restoreObject in interface ObjectPoolobj -
public boolean removeObject(PoolableObject obj)
removeObject in interface ObjectPoolobj -
public void clear()
ObjectPool
clear in interface ObjectPoolpublic ObjectFactory getObjectFactory()
ObjectPool
getObjectFactory in interface ObjectPoolpublic java.lang.String getObjectClass()
ObjectPool
getObjectClass in interface ObjectPoolpublic int getWorking()
ObjectPool
getWorking in interface ObjectPoolpublic int getRest()
ObjectPool
getRest in interface ObjectPool
protected void doInit()
throws java.lang.Exception
ComponentSupport
doInit in class ComponentSupportjava.lang.Exception
protected void doDestroy()
throws java.lang.Exception
ComponentSupport
doDestroy in class ComponentSupportjava.lang.Exceptionpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||