1. protected static final ThreadLocal<? extends RequestContext> threadLocal = new ThreadLocal<RequestContext>() {
    2. @Override
    3. protected RequestContext initialValue() {
    4. try {
    5. return contextClass.newInstance();
    6. } catch (Throwable e) {
    7. throw new RuntimeException(e);
    8. }
    9. }
    10. };