Engine Hooks

Engine Hooks are implemented to perform operations on an Engine:

On library initialization
Before or after Service invocation
On Engine termination

Engine Hooks are useful for performing AOP operations such as setting up a global environment, administering a database or other external component, or collecting metrics on performance or utilization without requiring Services to call a library on their own. You can also use them to do things like restart an Engine after a certain number of invocations.

Engine Hook implementation details are in the JavaDoc documentation for the EngineHook class.

Add Engine Hooks by adding the XML and JAR file containing the class definition to a Grid Library. In order for an Engine Hook to always be loaded at Engine startup, you can define it as a Super Grid Library. For more information about Super Grid Libraries, see the TIBCO GridServer® Administration. You can use multiple XML files in Grid Libraries (as opposed to the method of having a single hooks.xml file, used in previous releases). Note that if you are using Grid Libraries, hooks in the deploy directory do not work. For an example of the XML format to use for your Hook, see the EngineHook JavaDoc.