hi
i have a task that needs to be executed at frequent intervals of time(every 5 min.) so i have been using scheduler-service.xml of
jboss to do that. declaration of this class in scheduler-service is as follows.
now, my scheduled implementation(PollingThread) needs to access spring related beans. i have declared a private variable of spring bean inside PollingThread and it is not instatiating that and is giving null pointer exception while accessing spring related bean. so this should be passed as paramter in one of application context.
how can I inject spring bean inside polling
thread. should i delcare polling thread as one bean in spring application context and pass spring bean to it.
If I declare it in spring application context, am i not technically declaring them in two places and it is getting created twice?
Please suggest .
Thanks