You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2010/08/09 22:17:16 UTC

[jira] Commented: (TAP5-1239) @Startup annotation does not appear to work

    [ https://issues.apache.org/jira/browse/TAP5-1239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896681#action_12896681 ] 

Howard M. Lewis Ship commented on TAP5-1239:
--------------------------------------------

Wow!  Did I really do that?

> @Startup annotation does not appear to work
> -------------------------------------------
>
>                 Key: TAP5-1239
>                 URL: https://issues.apache.org/jira/browse/TAP5-1239
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.0
>            Reporter: Howard M. Lewis Ship
>            Assignee: Igor Drobiazko
>             Fix For: 5.2.1
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.