|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport (src) org.jboss.system.ServiceMBeanSupport (src) org.jboss.ejb.plugins.AbstractInstancePool
Abstract Instance Pool class containing the basic logic to create an EJB Instance Pool.
Field Summary | |
protected Container (src) |
container
The Container the instance pool is associated with |
protected int |
maxSize
The maximum number of instances allowed in the pool |
protected java.util.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 (src) |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean (src) |
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 (src) |
create(java.lang.Object instance)
|
protected void |
destroyService()
Sub-classes should override this method to provide custum 'destroy' logic. |
void |
discard(EnterpriseContext (src) ctx)
Discard an anonymous instance after invocation. |
void |
free(EnterpriseContext (src) ctx)
Return an instance after invocation. |
EnterpriseContext (src) |
get()
Get an instance without identity. |
long |
getAvailableCount()
Get the current avaiable count from the strict max view. |
Container (src) |
getContainer()
|
int |
getCurrentSize()
Return the size of the pool. |
int |
getMaxSize()
Get the maximum size of the pool. |
void |
importXml(org.w3c.dom.Element element)
XmlLoadable implementation |
void |
setContainer(Container (src) c)
Set the callback to the container. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
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 (src) |
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.Service (src) |
create, destroy, start, stop |
Field Detail |
protected Container (src) container
protected java.util.LinkedList pool
protected int maxSize
protected boolean reclaim
Constructor Detail |
public AbstractInstancePool()
Method Detail |
public void setContainer(Container (src) c)
setContainer
in interface ContainerPlugin (src)
c
- public Container (src) getContainer()
public int getCurrentSize()
InstancePool (src)
getCurrentSize
in interface InstancePool (src)
public int getMaxSize()
InstancePool (src)
getMaxSize
in interface InstancePool (src)
public long getAvailableCount()
public EnterpriseContext (src) get() throws java.lang.Exception
get
in interface InstancePool (src)
java.rmi.RemoteException
java.lang.Exception
- RemoteExceptionpublic void free(EnterpriseContext (src) ctx)
free
in interface InstancePool (src)
ctx
- public void discard(EnterpriseContext (src) ctx)
InstancePool (src)
discard
in interface InstancePool (src)
ctx
- The context to discard.public void importXml(org.w3c.dom.Element element) throws DeploymentException (src)
importXml
in interface XmlLoadable (src)
DeploymentException (src)
protected abstract EnterpriseContext (src) create(java.lang.Object instance) throws java.lang.Exception
java.lang.Exception
protected void destroyService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
destroyService
in class ServiceMBeanSupport (src)
java.lang.Exception
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |