[CONF] Apache Tapestry IoC - startup

2010-12-28 Thread confluence







IoC - startup
Page moved by Bob Harner






From: 

Apache Tapestry
 Registry Startup


To: 

Apache Tapestry
 Redirects





Children moved






   
Change Notification Preferences
   
   View Online
   









[CONF] Apache Tapestry IoC - startup

2010-12-22 Thread confluence







IoC - startup
Page  added by Bob Harner

 

 This page has been moved to Registry Startup


   
Change Notification Preferences
   
   View Online
   








[CONF] Apache Tapestry IoC - startup

2010-11-23 Thread confluence







IoC - startup
Page edited by Christophe Cordenier


Comment:
Fix broken links


 Changes (1)
 



...
{since:since=5.2}{since}  
Instead of making contributions to the RegistryStartup service configuration you can provide startup methods inside your modules. A startup method is a static or instance method of a module annotated with [Startup|../apidocs/org/apache/tapestry5/ioc/annotations/Startup.html] [Startup|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Startup.html] annotation. Each module is allowed to contain several startup methods. 
 {code:java} 
...

Full Content

Registry Startup

It is possible to provide extra logic to be executed at Registry startup, by making contributions to the RegistryStartup service configuration.

The values contributed are Runnable objects. The configuration is ordered, so it is possible to control in what order the objects are executed.

RegistryStartup occurs after eager loaded services are instantiated.

Here's an example of a module that makes a contribution.



public class MyModule
{
  public static void contributeRegistryStartup(OrderedConfigurationRunnable configuration)
  {
configuration.add("MyContributionName", new Runnable() { ... });
  }
}


Generally, these contributions are in the form of inner classes; if they were services, they could just be eagerly loaded.

Startup Methods



Added in 5.2


Instead of making contributions to the RegistryStartup service configuration you can provide startup methods inside your modules. A startup method is a static or instance method of a module annotated with Startup annotation. Each module is allowed to contain several startup methods.



public class MyModule
{

  @Startup
  public static void initMyApplication(Logger logger, MyService service)
  {
logger.info("Starting up...");

service.init();
  }
}





Change Notification Preferences

View Online
|
View Changes









[CONF] Apache Tapestry IoC - startup

2010-09-20 Thread confluence







IoC - startup
Page moved by Ulrich Stärk






From: 

Apache Tapestry



To: 

Apache Tapestry
 IoC





Children moved






   
Change Notification Preferences
   
   View Online