Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » ejb » plugins » [javadoc | source]
org.jboss.ejb.plugins
abstract public class: AbstractPassivationJob [javadoc | source]
java.lang.Object
   org.jboss.ejb.plugins.AbstractPassivationJob

All Implemented Interfaces:
    Executable

Abstract class for passivation jobs. Subclasses should implement #execute synchronizing it in some way because the execute method is normally called in the passivation thread, while the cancel method is normally called from another thread. To avoid that subclasses override methods of this class without make them synchronized (except execute of course), they're declared final.
Field Summary
protected  EnterpriseContext ctx     
protected  Object key     
protected  boolean isCancelled     
protected  boolean isExecuted     
Constructor:
 AbstractPassivationJob(EnterpriseContext ctx,
    Object key) 
Method from org.jboss.ejb.plugins.AbstractPassivationJob Summary:
cancel,   executed,   getEnterpriseContext,   getKey,   isCancelled,   isExecuted
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.ejb.plugins.AbstractPassivationJob Detail:
 final synchronized  void cancel() 
    Mark this job for cancellation.
 final synchronized  void executed() 
    Mark this job as executed
 final EnterpriseContext getEnterpriseContext() 
    Returns the EnterpriseContext associated with this passivation job, so the bean that will be passivated. No need to synchronize access to this method, since the returned reference is immutable
 final Object getKey() 
    (Bill Burke) We can't rely on the EnterpriseContext to provide PassivationJob with a valid key because it may get freed to the InstancePool, then reused before the PassivationJob executes.
 final synchronized boolean isCancelled() 
    Returns whether this job has been marked for cancellation
 final synchronized boolean isExecuted() 
    Returns whether this job has been executed