com.sun.ejb.containers
Class EJBTimerService

java.lang.Object
  extended by com.sun.ejb.containers.EJBTimerService

public class EJBTimerService
extends Object


Constructor Summary
EJBTimerService(String appID, TimerLocal timerLocal)
           
 
Method Summary
 void createSchedules(long containerId, long applicationId, Map<MethodDescriptor,List<ScheduledTimerDescriptor>> methodDescriptorSchedules, String server_name)
          Create automatic timers defined by the @Schedule annotation on the EJB bean during deployment to a cluster or the first create-application-ref call after deployment to DAS only.
 void destroyAllTimers(long applicationId)
          Destroy all timers associated with a particular application.
 void destroyTimers(long containerId)
          Destroy all timers associated with a particular ejb container This is typically called when an ejb is undeployed.
 String[] listTimers(String[] serverIds)
          Provide a count of timers owned by each server
 int migrateTimers(String fromOwnerId)
          Take ownership of another server's timers.
 void onShutdown()
          Called from TimerBeanContainer
 boolean restoreEJBTimers()
          Called at server startup *after* user apps have been re-activated to restart any active EJB timers.
 void setPerformDBReadBeforeTimeout(boolean defaultDBReadValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBTimerService

public EJBTimerService(String appID,
                       TimerLocal timerLocal)
                throws Exception
Throws:
Exception
Method Detail

listTimers

public String[] listTimers(String[] serverIds)
Provide a count of timers owned by each server


migrateTimers

public int migrateTimers(String fromOwnerId)
Take ownership of another server's timers.


setPerformDBReadBeforeTimeout

public void setPerformDBReadBeforeTimeout(boolean defaultDBReadValue)

restoreEJBTimers

public boolean restoreEJBTimers()
Called at server startup *after* user apps have been re-activated to restart any active EJB timers.


destroyTimers

public void destroyTimers(long containerId)
Destroy all timers associated with a particular ejb container This is typically called when an ejb is undeployed. It expunges all timers whose timed object matches the given container. In the case of an entity bean container, all timers associated with any of that container's entity bean identities will be destroyed. This action *can not* be rolled back.


destroyAllTimers

public void destroyAllTimers(long applicationId)
Destroy all timers associated with a particular application. This is called when an application is undeployed. It expunges all timers whose timed object matches the given application. In the case of an entity bean container, all timers associated with any of that container's entity bean identities will be destroyed. This action *can not* be rolled back.


createSchedules

public void createSchedules(long containerId,
                            long applicationId,
                            Map<MethodDescriptor,List<ScheduledTimerDescriptor>> methodDescriptorSchedules,
                            String server_name)
Create automatic timers defined by the @Schedule annotation on the EJB bean during deployment to a cluster or the first create-application-ref call after deployment to DAS only. Only persistent schedule based timers for the containerId that has no timers associated with it, will be created. And no timers will be scheduled.


onShutdown

public void onShutdown()
Called from TimerBeanContainer



Copyright © 2012 GlassFish Community. All Rights Reserved.