You should use the request stack instead.