|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.ejb.plugins.AbstractInstancePool
Abstract Instance Pool class containing the basic logic to create an EJB Instance Pool.
Field Summary | |
protected Container |
container
The Container the instance pool is associated with |
protected int |
maxSize
The maximum number of instances allowed in the pool |
protected LinkedList |
pool
The pool data structure |
protected boolean |
reclaim
determine if we reuse EnterpriseContext objects i.e. |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
AbstractInstancePool()
|
Method Summary | |
protected abstract EnterpriseContext |
create(Object instance)
|
protected void |
destroyService()
|
void |
discard(EnterpriseContext ctx)
Discard an anonymous instance after invocation. |
void |
free(EnterpriseContext ctx)
Return an instance after invocation. |
EnterpriseContext |
get()
Get an instance without identity. |
Container |
getContainer()
|
int |
getCurrentSize()
Return the size of the pool. |
int |
getMaxSize()
Get the maximum size of the pool. |
void |
importXml(Element element)
XmlLoadable implementation |
void |
setContainer(Container c)
Set the callback to the container. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, startService, stop, stopService |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Field Detail |
protected Container container
protected LinkedList pool
protected int maxSize
protected boolean reclaim
Constructor Detail |
public AbstractInstancePool()
Method Detail |
public void setContainer(Container c)
setContainer
in interface ContainerPlugin
c
- public Container getContainer()
public int getCurrentSize()
InstancePool
getCurrentSize
in interface AbstractInstancePoolMBean
public int getMaxSize()
InstancePool
getMaxSize
in interface AbstractInstancePoolMBean
public EnterpriseContext get() throws Exception
get
in interface InstancePool
RemoteException
Exception
- RemoteExceptionpublic void free(EnterpriseContext ctx)
free
in interface InstancePool
ctx
- public void discard(EnterpriseContext ctx)
InstancePool
discard
in interface InstancePool
ctx
- The context to discard.public void importXml(Element element) throws org.jboss.deployment.DeploymentException
importXml
in interface XmlLoadable
org.jboss.deployment.DeploymentException
protected abstract EnterpriseContext create(Object instance) throws Exception
Exception
protected void destroyService() throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |