|
From: Burton R. <bur...@gm...> - 2009-04-01 01:25:19
|
Apologies if there is an easy answer to this, but I am a bit new a Spring. I have somewhat complicated service class that is heavily integrated into my web app (usuing struts 1.6, spring 2.5, jpa, hibernate, tomcat 6). By integrated, I mean it is injected with several dao's, other services, etc. This process is currently run manually by the user started through a web page (or servlet). Now I would like to run this process automatically (each night) presummably from the command line. I am having trouble figuring out how to go about this so that I can access the dao's already setup in the web context without running it via a servlet. I have looked into the remoting capabilities and this seems a bit involved given the simplicity of what I would like to accomplish. I don't really need a "stand-alone" solution (http://static.springframework.org/spring/docs/2.5.x/reference/remoting.html) Is there an easier way to access the webcontext inside the web app from a command line pojo? Or another solution I'm not thinking of for putting a service/utility class on a "timer" inside a web app? Many thanks, Burton |