DB2 filters

Request filters are invoked when a request is received from a database client. 

Response filters are invoked when a response is received from the database server. 

Duplex filters are invoked in both cases.

Filters are given the opportunity to look at the packet and do whatever they want with it: let it through, modify it, or reject it. Unless it's rejected, the packet is then forwarded to its destination.

Note that the term "packet" is used loosely here -- any many cases the filter will not actually interact with a single packet, because (for instance) result sets are comprised of several actual packets. This is only relevant in advanced use cases.


All filters define the following variables, which can be accessed from your JavaScript code:

Request filters types

Response filter types

Duplex filter types

Connection filters are also available if you need to execute logic when a connection to the database is opened or closed.