Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 4 Hibernate Resume : Defining a Hibernate Advice Implementation

Defining a Hibernate Advice Implementation
To define a hibernate advice implementation, you must:
@AdviceImpl (
hibernatesJobs=true
)
Should call the setHibernateJobEnabled(<timeDelay>) on the AspectProcessContext object.
timeDelay
Use <timeDelay> attribute to set a time after which the job will be hibernated. This facility is provided for asynchronous activities on the parallel paths to complete execution. A time delay set to zero (0) will hibernate the job immediately without waiting.
Example of Hibernate Advice Implementation
Execution of a Hibernate Advice
The job may not get hibernated right after an advice calls setHibernateJobEnabled(long). Hence, the engine must finish executing all advices that are part of the same join point before initiating the hibernate procedure. Even after that, the job may still not immediately get hibernated correctly.
The advice that triggers the hibernation may choose to delay it, in order to give chance to any asynchronous advice or any asynchronous activity that might exist in the job on parallel tracks to finish executing. To accomplish that, the advice implementation must call setHibernatedJobEnabled(long) method by passing a timeDelay greater than 0 (zero). A 0 (zero) timeDelay ensures that the hibernation is initiated right after the engine finishes executing all advices that are running in that particular join point.
Figure 17 Hibernate Advice Execution
Resuming the Hibernated Job
TIBCO Hawk methods have been exposed for listing and resuming the hibernated jobs. A job is resumed from the next point of execution. For example, for a "Before" hibernated advice, the job will resume from activity execution.
The TIBCO Hawk methods are:
GetHibernatedProcesses() - returns a Tabular Data with all hibernate jobs information
A job hibernated on one engine can be resumed on a different instance of the engine. However, the engine must be running prior to calling the ResumeHibernatedProcess().
Figure 18 GetHibernatedProcesses Dialog
Example of Resuming a Job
Figure 19 shows an example of resuming a job from TIBCO Administrator Hawk console.
Figure 19 Resuming a Job
Figure 20 Resuming a Job (After Returning)
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved