[CB 3.8] Error locking session scope with customer interception point.

I have a new custome interception point and a single interceptor which listens for it.

The interception point is called “viewProductSearch”

and my interceptor is called “ProductSearchViewDataSetup”

I have a dependancy within the interceptor which does is a facade for my session scope… it basically locks session when getting and setting session vars.
This is called SessionFacade.

When I attempt to announce my viewProductSearch interception point I get an error telling me it cannot lock the session scope.

This is the error

# Cannot lock session scope.
Cannot use cflock to lock the application or session shared scopes without these scopes using the cfapplication tag. To use the session scope, you must enable session management. Application and/or Session variables must also be enabled in the ColdFusion Administrator.

The error occurred in C:/www/epsys/code/model/SessionFacade.cfc: line 31 |

If I then comment out my interceptor this error vanishes…and then when I reinstate the interceptor the error is still being triggered? which is a little odd.

however once I have got rid of the error my custom interception will not fire… The code around the announceInterception works fine but the announceInterception does nothing.

Any thoughts ideas what could be causing my issues would be appreciated.


One more thing worth mentioning is that I get my sessionFacade from wirebox …


variables.objSessionFacade = application.wirebox.getInstance(‘SessionFacade’);


So are you saying that your Application.cfc has session management enabled?

It does yes…

Btw… thanks for replying.


I have dump some further digging and it would appear the session lock error is because the session does not exist
at the point it attempts to lock it.
But this makes no sense… I have created a separate test.cfm page which dumps out the session scope with no issue.

So the session is up and running in my application but not available to my sessionFacade…

not only that… in my test.cfm I can deploy the same code that is in my interceptor but it works fine

//Session facaded
variables.objSessionFacade = application.wirebox.getInstance(‘SessionFacade’);
local.strDSN = variables.objSessionFacade.get(‘strDSN’);