0

I referred some example on stackoverflow..but it is giving me exception:


Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListener
java.lang.IllegalArgumentException  at
java.util.concurrent.ScheduledThreadPoolExecutor.scheduleAtFixedRate(ScheduledThreadPoolExecutor.java:562)

Example I followed:- How to parameterize @Scheduled(fixedDelay) with Spring 3.0 expression language?

Community
  • 1
  • 1
  • Post some code, configuration and the full stack trace currently there is too little information here. – M. Deinum Jun 12 '15 at 07:50
  • This is the link of my code- http://stackoverflow.com/questions/30799657/dynamically-pass-parameters-to-scheduled-annotaion – Shubhangi Goel Jun 12 '15 at 09:27
  • Please add the code to your question don't let people click links and search the internet to get the whole picture of your question. – M. Deinum Jun 12 '15 at 09:34
  • Also I don't see the relation with `@Scheduled` as the only thing that is there is XML. And why on earth the contraption you are using, what is wrong with putting the value in a properties file and use that... – M. Deinum Jun 12 '15 at 09:35
  • if I put values in properties file it will remain static; I want user to take control and set value for fixed-rate. – Shubhangi Goel Jun 12 '15 at 09:38
  • Your code doesn't change that it is still static, regardless the fact if you change it. The value is read at startup and after that remains as it was, even if you change it after startup. – M. Deinum Jun 12 '15 at 09:39
  • This fixed-rate argument is a part of @Scheduled; we can specify in any of the two ways either in xml or along with method definition – Shubhangi Goel Jun 12 '15 at 09:40
  • can u suggest me some link regarding this:user set the fixedrate for sending emails through some interface – Shubhangi Goel Jun 12 '15 at 09:42
  • No as that isn't possible without restarting the application or manually stopping the task and create a new one. It isn't as simple just modifying a property. – M. Deinum Jun 12 '15 at 09:42
  • okay, thanx.will try to find some way. – Shubhangi Goel Jun 12 '15 at 09:45

0 Answers0