Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1239

@Startup annotation does not appear to work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 5.2.0
    • 5.2.1
    • tapestry-ioc
    • None

    Description

      Attempted to use @Startup as follows:

      @Startup
      private static void preloadPages(Logger logger,
      ComponentClassResolver resolver, ComponentSource source) {
      long start = System.currentTimeMillis();

      for (String name : resolver.getPageNames())

      { logger.info("Preloading page " + name); source.getPage(name); }

      long end = System.currentTimeMillis();

      logger.info(String.format("Loaded %d pages in %,d ms", resolver
      .getPageNames().size(), end - start));
      }

      However, my startup method was not invoked. I dug around with the debugger, and it appears that the startupDefs property of the ModuleDefImpl is empty.

      Attachments

        Activity

          People

            igor.drobiazko Igor Drobiazko
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: