Some more explanation of the worker jni hooks.

Why the hooks?
To be able to execute a particular class during a different process
stage.

There are 4 types of hooks (as briefly explained in the commit mail):

1. onStartup (worker.jni:onStartup)
This hook will register the native functions for the AprImpl, redirect
the stdout/stderr if set and run the specified class.
Only one worker can be executed on startup.

2. onInit (worker.jni:onInit)
Executes on startup but doesn't redirect nor registers natives. There
can be any number of workers in this stage and they are distinguished by
name suffix (worker.jni:onInit1, etc..)
The patch uses strncmp for hook type checking.

3. onClose (worker.jni:onClose)
Executes when the connector is about to be destroyed. There can be any
number of workers in this stage and they are distinguished by name
suffix (worker.jni:onClose1, etc..)
The patch uses strncmp for hook type checking.

4. onShutdown (worker.jni:onShutdown)
Executes when the connector is about to be destroyed. It also waits for
TC shutdown signal, and then destroys the jvm.
Only one worker can be executed on shutdown.


The order of worker execution is their order in the workers2.properties
file. I'm looking for a way to rearrange that (at least onStartup and
onShutdown) accordingly to the hook order, and then the config order.

MT.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to