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


Chapter 3 Asynchronous Advice Implementations : Asynchronous Advices in ActiveMatrix BusinessWorks Engine

Asynchronous Advices in ActiveMatrix BusinessWorks Engine
This section describes the various models of asynchronous advice working in the TIBCO ActiveMatrix BusinessWorks engine.
Execution Model (Successful Execution)
Successful execution - execute() and postExecute()
The engine calls execute() to start the execution.
The engine calls postExecute() to finish executing the implementation.
The ActiveMatrix BusinessWorks engine’s job thread is not blocked until the advice finishes executing and produces its result.
Execution Model (timeout)
Timed out execution: execute() and cancelled()
The engine calls execute() to start the execution.
Before the advice returns from execute(), it sets a timeout.
When a timeout occurs, the engine calls cancelled() to finish executing the implementation.
AspectProcessContext cannot be used by asynchronous advices on the parallel thread.
 
 
 
Threading Model: Asynchronous Advice Implementations
Figure 15 shows the threading model.
Figure 15 Threading Model
Asynchronous Advice Example
Threading Model: Asynchronous Advice Implementations (Timeout)
Figure 16 Threading Model (Timeout)
Summary
This can be summarized as:
When implementing the cancelled() method, perform a graceful stop of the advice thread.
Do not use AspectProcessContext on the advice (parallel) thread.
 
 
 

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