This content has been marked as final.
Show 4 replies
-
1. Re: Qestion about timers in jboss seam
pmuir Aug 14, 2007 8:37 AM (in response to vadger)Use
@Observer("org.jboss.seam.postInitialization")
-
2. Re: Qestion about timers in jboss seam
vadger Aug 14, 2007 8:45 AM (in response to vadger)Am I right, if I have for instance:
@Stateful @Name("paymentAction") public class CreatePaymentAction { @In(create=true) PaymentHandler paymentHandler; @In Bill bill; public String schedulePayment() { paymentHandler.processScheduledPayment( new Payment(bill), bill.getDueDate() ); return "success"; } public String scheduleRecurringPayment() { paymentHandler.processRecurringPayment( new Payment(bill), bill.getDueDate(), ONE_MONTH ); return "success"; } }
The example is taken from seam documentation.
So, if I want to invoke method at deploy time, I have to do next:@Stateful @Name("paymentAction") public class CreatePaymentAction { @In(create=true) PaymentHandler paymentHandler; @In Bill bill; public String schedulePayment() { paymentHandler.processScheduledPayment( new Payment(bill), bill.getDueDate() ); return "success"; } @Observer("org.jboss.seam.postInitialization") public String scheduleRecurringPayment() { paymentHandler.processRecurringPayment( new Payment(bill), bill.getDueDate(), ONE_MONTH ); return "success"; } }
? -
3. Re: Qestion about timers in jboss seam
pmuir Aug 14, 2007 8:52 AM (in response to vadger)Yup, though you probably don't need it to be stateful.
-
4. Re: Qestion about timers in jboss seam
vadger Aug 14, 2007 8:59 AM (in response to vadger)tnx a lot :) JBoss Seam is really smart and elegant application framework, I like it :)