code: public Object createContext(Object param) throws Exception {
          try {
              if(mProfilingEnabled) {
                  return getConstructor().newInstance(new Object[] {
                      new TSContextFactory(param), TeaServletInvocationStats.getInstance()
                  });
              }
              else {
                  return getConstructor().newInstance(new Object[] {
                      new TSContextFactory(param), 
                      new MergedClass.InvocationEventObserver() {
                          public void invokedEvent(String caller, String callee, long elapsedTime) { }
                          public long currentTime() { return 0L; }
  
                      }});
              }
          }
          catch (Exception ex) {
              mLog.error(ex);
              throw ex;
          }
      }
docs: a generic method to create context instances