|
||||||||||
| 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
public abstract class 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 | |
|---|---|
void |
clear()
Clear the pool - does not remove inuse contexts |
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. |
long |
getAvailableCount()
Get the current avaiable count from the strict max view. |
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, getDeploymentInfo, 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, nextNotificationSequenceNumber, 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 |
| 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 ContainerPluginc - public Container getContainer()
public int getCurrentSize()
InstancePool
getCurrentSize in interface InstancePoolgetCurrentSize in interface AbstractInstancePoolMBeanpublic int getMaxSize()
InstancePool
getMaxSize in interface InstancePoolgetMaxSize in interface AbstractInstancePoolMBeanpublic long getAvailableCount()
getAvailableCount in interface AbstractInstancePoolMBeanpublic void clear()
AbstractInstancePoolMBean
clear in interface AbstractInstancePoolMBean
public EnterpriseContext get()
throws Exception
get in interface InstancePoolRemoteException
Exception - RemoteExceptionpublic void free(EnterpriseContext ctx)
free in interface InstancePoolctx - public void discard(EnterpriseContext ctx)
InstancePool
discard in interface InstancePoolctx - The context to discard.
public void importXml(Element element)
throws org.jboss.deployment.DeploymentException
importXml in interface XmlLoadableorg.jboss.deployment.DeploymentException
protected abstract EnterpriseContext create(Object instance)
throws Exception
Exception
protected void destroyService()
throws Exception
destroyService in class org.jboss.system.ServiceMBeanSupportException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||