Servlet listeners are not considered beans (even though they support injection and interception). See also 3.6. Java EE components. It's recommended not to define producer methods on Java EE components. So at least this will not be portable.