code: public static void setAccessContextOnThread(AccessContext accessContext) {
          if (accessContext == null) {
              String msg = "The argument[accessContext] must not be null.";
              throw new IllegalArgumentException(msg);
          }
          Stack<AccessContext> stack = threadLocal.get();
          if (stack == null) {
              stack = new Stack<AccessContext>();
              threadLocal.set(stack);
          }
          stack.add(accessContext);
      }
docs: Set prepared access-context on thread.
  @param accessContext The context of DB access. (NotNull)