FusionRequest objects obtained using FRAPI calls including getRunningRequests() return 0 from the call jdbcTotalQueryCount(), even if queries have been run prior to the call.
This is a bug.
The following code can be used to obtain this value until this bug is fixed.
The key operations are within the cfscript try/catch block, and use Reflection to obtain the relevant data.
The workaround uses Java Reflection to obtain an internal field, then queries that to obtain the count of JDBC Requests run in the context of the current request.
If Java is running in a (non-default) security mode, the Reflection calls may fail. In this case, the catch block will be used to default the query count, without causing an error in the page.
|Last Updated:||12/Nov/15 11:17 AM|
|Affects Version:||4.5.0, 5.0.0, 5.2.8|
FRS-372: Use FRAPI To Log CFThrow Errors, and Set HTTP Response Codes
Comments are closed.