When you boot up with a CDB that is already populated, the transaction hook won't be called. The transaction hook is meant to be called when you change something under the definition of the hook.
From the user guide:
tailf:transaction-hook Transaction hooks are a means to associate user code to the transaction. Whenever an element gets written, created, or deleted, user code gets invoked and can optionally write more data into the same transaction.
When your application boots up, all you can do is to either read the configuration or to trigger subscription notifications.