This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP and have Lucian Maly on-line!
See this thread for details.
Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Scheduler Using Spring

 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey its not working. No errors though, but showing up nothing. The code goes like this...

applicationContext.xml : Snippet


dispatcher.xml : Snippet



SmsAutoResponder.java


Main.java



I am getting the message from SmsAutoResponder constructor. But after that for 90 seconds nothing appears and program exits.

Can you spot possible errors or what I am missing?

Thanks.
[ October 24, 2008: Message edited by: Adeel Ansari ]
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your Spring applicationContext.xml also contain a bean definition for org.springframework.scheduling.quartz.SchedulerFactoryBean specifying the smsAutoResponderTrigger you're using? This is the main Quartz bean that handles firing triggers, calling jobs, etc. If this isn't defined, the trigger isn't going to be fired.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops. I missed that. I found it here as well,
Spring Framework Reference : Scheduling. Previously, i failed to notice this particular snippet, I wonder.

Thanks, Nathan.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At first I was following the example given in JavaRanch Journal. It was just fine. The only thing I realized now is, Christophe, repeated the SimpleTriggerBean in that particular example, but not the SchedulerFactoryBean. And I completely agree, that its reasonable to not repeat that since that would be exactly same even if repeated. But I beleive, it would have been better to mention it, at least.

Bottom line, I didn't read that thoroughly and missed that important snippet.
 
Are you here to take over the surface world? Because this tiny ad will stop you!
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic