Hi,

The FrameworkAdapter class currently uses a static variable to find its
singleton object. However static variables are tricky in unit testing,
and are a problem when a library is deployed via a shared classloader.

However the whole point of the FrameworkAdapter is that it is accessable
from anywhere, and is not JSF-specific which makes finding an
alternative implementation a little tricky.

The only thing which comes to mind is using a ThreadLocal, and having a
servlet request filter that sets up the threadlocal on request start and
resets it on request end. This is effectively how
FacesContext.getCurrentInstance works.

Do we care about FrameworkAdapter's use of a static, and if so does
anyone have any other suggestions?

Regards,

Simon

Reply via email to