Hi,
I', using Wicket to send html mail and I know that this has been asked many
times but I can't reuse my wicket tester. I have a cron job
@org.nnsoft.guice.guartz.Scheduled( cronExpression = "0/5 * * * * ?" ) that
executes and checks for mail.
@Inject MyApplication application
WicketTester tester = new WicketTester( application ) will fail.
There is no application attached to current thread main
If I create a WicketTester and want to reuse it in the next cron job I get
the same exception. I need to do this every time in my CronJob and it seems
to expensive.
Injector injector = Guice.createInjector(new MediaModule());
WicketTester tester = new WicketTester( new TestApplication(injector) );
....use the tester
Do I really need to do this every time the CronJob executes?
I', using Wicket to send html mail and I know that this has been asked many
times but I can't reuse my wicket tester. I have a cron job
@org.nnsoft.guice.guartz.Scheduled( cronExpression = "0/5 * * * * ?" ) that
executes and checks for mail.
@Inject MyApplication application
WicketTester tester = new WicketTester( application ) will fail.
There is no application attached to current thread main
If I create a WicketTester and want to reuse it in the next cron job I get
the same exception. I need to do this every time in my CronJob and it seems
to expensive.
Injector injector = Guice.createInjector(new MediaModule());
WicketTester tester = new WicketTester( new TestApplication(injector) );
....use the tester
Do I really need to do this every time the CronJob executes?