Re: t5: starting a service automatically

2008-10-12 Thread Martijn Brinkers
EagerLoad'ing a service means that the service is instantiated when the registry is started. Non-eagerloaded services are instantiated when the service is used for the first time. Because you want you Quartz service to be running at the start you can add the EagerLoad annotation to make sure that t

Re: t5: starting a service automatically

2008-10-12 Thread Angelo Chen
Hi Martijn, I use public static void contributeRegistryStartup, and it works. I just discover this EagerLoad, is it correct that either of one works, no need to use both? Angelo Martijn Brinkers (List)-2 wrote: > > You can flag the service to eager load (see @EagerLoad) > > Martijn Brinkers

Re: t5: starting a service automatically

2008-10-12 Thread Angelo Chen
Hi Lubor, Your approach works, thanks. Lubor Gajda wrote: > > Angelo, > > How are you instantiating scheduler in your application? Are you using > tapestry IOC module? > > /lubor > > On Sat, Oct 11, 2008 at 10:55 AM, Angelo Chen > <[EMAIL PROTECTED]>wrote: > >> >> Hi Lubor, >> >> Thanks fo

Re: t5: starting a service automatically

2008-10-11 Thread Lubor Gajda
Angelo, How are you instantiating scheduler in your application? Are you using tapestry IOC module? /lubor On Sat, Oct 11, 2008 at 10:55 AM, Angelo Chen <[EMAIL PROTECTED]>wrote: > > Hi Lubor, > > Thanks for the quick reply, is the scheduler here Quartz? I can't > understand > fully how to use

Re: t5: starting a service automatically

2008-10-11 Thread Martijn Brinkers
You can flag the service to eager load (see @EagerLoad) Martijn Brinkers On Sat, 2008-10-11 at 02:47 -0700, Angelo Chen wrote: > Hi, > > I have a service that uses Quartz to fire an event every minute, I'd like to > know how to start this service once the application is loaded? thanks. > > Ange

Re: t5: starting a service automatically

2008-10-11 Thread Angelo Chen
Hi Lubor, Thanks for the quick reply, is the scheduler here Quartz? I can't understand fully how to use this, any more details? Thanks. Angelo Lubor Gajda wrote: > > Hi Angelo, > > You can try this: > > public static void > contributeRegistryStartup(OrderedConfiguration > configuration, fin

Re: t5: starting a service automatically

2008-10-11 Thread Lubor Gajda
Hi Angelo, You can try this: public static void contributeRegistryStartup(OrderedConfiguration configuration, final Scheduler scheduler) { configuration.add("SchedulerStartup", new Runnable() { public void run() { scheduler.start() } }); } Rega

t5: starting a service automatically

2008-10-11 Thread Angelo Chen
Hi, I have a service that uses Quartz to fire an event every minute, I'd like to know how to start this service once the application is loaded? thanks. Angelo -- View this message in context: http://www.nabble.com/t5%3A-starting-a-service-automatically-tp19931132p19931132.html Sent from the Ta