myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simon <>
Subject [orchestra] FrameworkAdapter
Date Sat, 18 Aug 2007 10:54:09 GMT

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?



View raw message