|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=TYPE) @Documented public @interface AdviceImpl
An annotation used for tagging advice implementations.
An advice implementation java class must declare this annotation at the class level, in order to be recognized as a valid advice implementation. The BusinessWorks engine throws an exception at runtime if it finds an advice implemented with a class that is not properly annotated.
This annotation has four parameters used for advertising advice implementation metadata:
Here is an example of an AdviceImpl
declaration for an advice implementation that hibernates jobs and requires
READ-WRITE
data access:
All these parameters are optional.import com.tibco.bw.poa.runtime.annotation.AdviceImpl;
@AdviceImpl (
dataAccess ="READ-WRITE",
hibernatesJobs = true
)
public class MyAdviceImplementation ... { }
Advice
,
SyncAdvice
,
AsyncAdvice
Optional Element Summary | |
---|---|
java.lang.String |
dataAccess
The data access mode of this advice implementation, which specifies whether the advice implementation needs read-write access to the incoming XML document. |
boolean |
hibernatesJobs
Set by advice implementations that hibernate jobs. |
java.lang.String |
scope
The instantiation scope of this advice implementation java class, which specifies whether the BusinessWorks engine creates one or more java objects from this advice implementation class |
java.lang.String |
targetFilter
Set by advice implementations that are designed to be instantiated in very specific join points. |
java.lang.String |
targetKind
Set by advice implementations that are designed to be instantiated in very specific join points. |
public abstract java.lang.String scope
The supported values are:
public abstract java.lang.String dataAccess
This parameter is used for advertising an intent or a capability of the advice implementation. It does not place a requirement on the advice implementation to mutate the incoming XML document. The BusinessWorks engine uses this metadata parameter to determine when to give read-write access to a particular advice.
The supported values are:
If the advice implementation makes changes to the XML document, it must advertise a READ-WRITE
data access mode.
public abstract boolean hibernatesJobs
This parameter is used for advertising an intent or a capability of the advice implementation. It does not
place a requirement on the advice implementation to hibernate jobs. The BusinessWorks engine uses this metadata parameter to
determine when to allow a particular advice to hibernate jobs. The engine throws an exception at runtime, during the execution of
the advice, if if finds an advice that attempts to hibernate a job without having the hibernatesJobs
parameter set.
The supported values are:
If the advice implementation hibernates jobs, it must set the hibernatesJobs
parameter.
true
if the advice implementation hibernates jobs;
false
otherwise.public abstract java.lang.String targetKind
Often times advice implementations are designed to work in specific join points. For example, an advice implementation may be designed to only work in an AFTER THROWING join point. An advice of this implementation would not work if executed before an activity.
This parameter specifies the kind of join point the advice implementation must be executed in. The BusinessWorks engine ensures that the advice implementation is never instantiated in a different kind of join point. The engine throws an exception at the time it starts up if an advice is attempted to be instantiated in an invalid join point.
The supported values are:
The default value is "", which means that the advice implementation can be executed in any join point.
public abstract java.lang.String targetFilter
If the targetKind parameter is set, the developer of the advice implementation can also specify a target filter, which is used to further narrow down the scope of the instantiation context. For example, an advice implementation may only be instantiated in the context of a particular activity such as the File Read Activity. That is, if for example, the advice implementation depends on the input, output or fault types of that particular type of activity.
The value of this parameter is similar to the value of the type
parameter specified in the activity()
primitive, which can be used in a point cut expression. The only difference is that this parameter does not support wildcards.
For example, the target filter for the File Write Activity is bw.FileWriteActivity
. For more information,
see the TIBCO BusinessWorks ActiveAspects documentation.
The default value is "", which means that the advice implementation can be executed in any join point.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |