My application uses Struts in the presentation layer and Spring in the business and data layers. My Struts actions have also been made Spring beans by registering them in the Spring context file and using the DelegatingActionProxy.
My Spring context file that wires the beans is now lying in the WEB-INF folder and referred in the struts-config file.
The application also has a scheduler component that does not need a presentation layer. How do I make the Spring context file to be accessible to this class also? Where will I load the context file, since adding it to WEB-INF will only make it accessible via Struts.
I'm not sure whether this would be suitable in your case but you might like to look at Spring Job Scheduling support, which allows you to schedule jobs using either the JDK Timer (for simple scheduling) or Quartz (for more involved implementations). See Spring reference manual ch. 23: Scheduling and Thread Pooling.