سؤال

I want a method to be called everytime a request to a SessionScoped bean is made.

How can I do this?

It is like @PostConstruct, but I want this method to be called, for example everytime a request to a page that is backed by this bean is accessed.

Thanks.

هل كانت مفيدة؟

المحلول

You can use an Interceptor on class level, more information: http://docs.oracle.com/cd/E16439_01/doc.1013/e13981/ses30cfg008.htm#BCGDHEBF

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top