|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.ejb3.EJBContainer
org.jboss.ejb3.TimerServiceContainer
public abstract class TimerServiceContainer
A EJBContainer which contains the common functionality around EJB3 timer service.
TimerServiceContainer is responsible for creating, restoring and suspending TimerService
at the right time during EJBContainer lifecycle events. The TimerServiceContainer knows
about EJB3 spec rules and takes care of not creating, restoring or suspending timer service for
stateful session beans.
| Field Summary | |
|---|---|
protected javax.ejb.TimerService |
timerService
TimerService which will be created for this container |
| Fields inherited from class org.jboss.ejb3.EJBContainer |
|---|
assembly, beanClassName, classloader, ejbName, enc, encFactory, encInjections, encInjectors, ENTITY_MANAGER_FACTORY, initialContextProperties, injectors, invokeStats, MANAGED_ENTITY_MANAGER_FACTORY, metadataBasedAnnotationRepo, objectName, pool, reinitialize, xml |
| Fields inherited from interface org.jboss.ejb3.Container |
|---|
ENC_CTX_NAME |
| Constructor Summary | |
|---|---|
protected |
TimerServiceContainer(java.lang.String name,
org.jboss.aop.Domain domain,
java.lang.ClassLoader cl,
java.lang.String beanClassName,
java.lang.String ejbName,
java.util.Hashtable ctxProperties,
Ejb3Deployment deployment,
org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData beanMetaData)
Constructor |
| Method Summary | |
|---|---|
protected void |
afterStart()
Restores the timers after this container has fully started, thus ensuring that any invocations on this container through the restored timers are handled successfully |
void |
create()
Creates a TimerService for this container. |
protected abstract org.jboss.ejb3.timerservice.spi.TimedObjectInvoker |
getTimedObjectInvoker()
Returns the TimedObjectInvoker which will be used by the
timer implementations to invoke the timeout method (annotated with Timeout
or specified in deployment descriptor) on the bean. |
javax.ejb.TimerService |
getTimerService()
Returns the TimerService associated with this container. |
javax.ejb.TimerService |
getTimerService(java.lang.Object pKey)
Returns the TimerService associated with this container. |
protected void |
lockedStop()
Suspends the TimerService associated with this container. |
void |
setTimerServiceFactory(org.jboss.ejb3.timerservice.spi.TimerServiceFactory factory)
Set the TimerServiceFactory, which will be used for managing
the TimerService associated with this container |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.ejb3.Container |
|---|
getMBean |
| Field Detail |
|---|
protected javax.ejb.TimerService timerService
| Constructor Detail |
|---|
protected TimerServiceContainer(java.lang.String name,
org.jboss.aop.Domain domain,
java.lang.ClassLoader cl,
java.lang.String beanClassName,
java.lang.String ejbName,
java.util.Hashtable ctxProperties,
Ejb3Deployment deployment,
org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData beanMetaData)
throws java.lang.ClassNotFoundException
name - Name of the containerdomain - AOP domain for this containercl - Classloader of this containerbeanClassName - The fully qualified class name of the EJBejbName - The name of the EJBctxProperties - Naming context propertiesdeployment - Deployment, can be nullbeanMetaData - Metadata of the EJB
java.lang.ClassNotFoundException| Method Detail |
|---|
public void create()
throws java.lang.Exception
TimerService for this container.
TimerService creation is skipped for stateful session beans, since
stateful session beans do not support timerservice
create in interface Containercreate in class EJBContainerjava.lang.ExceptionEJBContainer.create()protected void afterStart()
This method skips timerservice restoration of stateful session beans
afterStart in class EJBContainerEJBContainer.afterStart()
protected void lockedStop()
throws java.lang.Exception
TimerService associated with this container.
This method skips timerservice suspension of stateful session beans
lockedStop in class EJBContainerjava.lang.ExceptionEJBContainer.lockedStop()public javax.ejb.TimerService getTimerService()
TimerService associated with this container.
java.lang.UnsupportedOperationException - If this container corresponds to a stateful session beanpublic javax.ejb.TimerService getTimerService(java.lang.Object pKey)
TimerService associated with this container.
java.lang.UnsupportedOperationException - If this container corresponds to a stateful session beanpublic void setTimerServiceFactory(org.jboss.ejb3.timerservice.spi.TimerServiceFactory factory)
TimerServiceFactory, which will be used for managing
the TimerService associated with this container
factory - protected abstract org.jboss.ejb3.timerservice.spi.TimedObjectInvoker getTimedObjectInvoker()
TimedObjectInvoker which will be used by the
timer implementations to invoke the timeout method (annotated with Timeout
or specified in deployment descriptor) on the bean.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||