What is the scope of accessBean? If it's anything less than application scope, I believe the function will fail to run, because JSF cannot find the bean.
Nonetheless, this isn't the recommended method for handling session expirations. For the preferred one, see BalusC's method.