|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 |
currentIndex
|
protected int |
maxSize
The maximum number of instances allowed in the pool |
protected int |
minSize
The minimum size of the pool |
protected boolean |
minSizeInitialized
|
protected int |
overMax
|
protected int |
overMin
|
protected EnterpriseContext[] |
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 |
getMaximumSize()
|
int |
getMaxSize()
Get the maximum size of the pool. |
int |
getMinimumSize()
|
boolean |
getStrictMaximumSize()
|
long |
getStrictTimeout()
|
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 EnterpriseContext[] pool
protected int currentIndex
protected int maxSize
protected int minSize
protected boolean reclaim
protected volatile int overMin
protected volatile int overMax
protected boolean minSizeInitialized
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 int getMaximumSize()
getMaximumSize
in interface AbstractInstancePoolMBean
public int getMinimumSize()
getMinimumSize
in interface AbstractInstancePoolMBean
public boolean getStrictMaximumSize()
getStrictMaximumSize
in interface AbstractInstancePoolMBean
public long getStrictTimeout()
getStrictTimeout
in interface AbstractInstancePoolMBean
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 |