Пример #1
0
  public void enqueue() {
    // these tasks run on the background thread...
    ModulesService modulesApi = ModulesServiceFactory.getModulesService();
    String hostname = modulesApi.getVersionHostname(ServletConsts.BACKEND_GAE_SERVICE, null);
    task.header(ServletConsts.HOST, hostname);

    Queue queue = QueueFactory.getDefaultQueue();
    queue.add(task);
  }
  @Override
  public void doFilter(
      ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
      throws IOException, ServletException {

    ModulesService modulesApi = ModulesServiceFactory.getModulesService();
    String instanceHostname =
        modulesApi.getCurrentInstanceId()
            + "."
            + modulesApi.getCurrentVersion()
            + "."
            + modulesApi.getCurrentModule();
    Logger logger = LoggerFactory.getLogger(instanceHostname);
    logger.info(logger.getName());

    logger.info("begin guice filter");
    super.doFilter(servletRequest, servletResponse, filterChain);
    logger.info("end guice filter");

    return;
  }