You can bind code to the registry startup like this: public static void contributeRegistryStartup(OrderedConfiguration<Runnable> configuration) { configuration.add("MyStartupCode", new Runnable() { public void run() { // initialize stuff } }); }
the provided Runnable will be run as soon as the registry is created, therefore, at application startup. On Wed, Nov 12, 2008 at 2:25 PM, Charles Mason <[EMAIL PROTECTED]>wrote: > Hi All, > > I am developing a web app using Tapestry 5, half of it is a > conventional CRUD DB interface style web app. The other part has a > data collector which runs in a separate thread every 4 hours. The > collector is currently implemented as a Tapestry 5 service so the web > app portion of it can access its status. > > My problem is at present it only initialises when the first request is > made for a page in the web app. Since the system will be very low > traffic and chances are the server its on will be shutdown/restarted > more often than most web facing servers, I would really like the > service to load when tapestry does. > > Is there anyway to get Tapestry's IOC to initialise the service at > Tapestry's start up rather than when the first page request is made? > > Charlie M > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >