I extended the Appfuse Basic Spring MVC archetype. I have modified the app to do what i want to do: parse a certain website, modify the data from this website and then persist it locally.
I'm using a web form that the user (me) fills out saying how much of the site I want parsed. It parses the site page-by-page, using hibernate to persist the scraped data after each page has been parsed. The parsing process itself is quite complicated as I'm only looking for specfic data so it takes a little bit of time. When I input instructions for parsing a small amount of pages (1-3) - everything works just fine; I click submit and my form controller takes over, goes into the onSubmit method and does everything it needs to do and the user is forwarded to the success page. However, for larger parsing tasks, the controller (and the onSubmit method) is being called twice; once straight after i submit the form and the second time after about 10-15 seconds of parsing. Looking at the jetty output, it seems a new thread has been initiated and is doing exactly the same thing as the previous thread i.e. trying to persist the same data resulting in JDBC errors. As the app is only for me and eventually will take many minutes to run a full parsing session, I have 2 questions: 1. What is causing the second thread to be kicked off? Does Spring have a time limit on Controllers returning? Where can I modify this? 2. Any suggestions for a better solution? I do use quite a bit of data from the HttpServletRequest object plus using a lot from my ApplicationResources.properties file, just to note. Thanks in advance, Robin -- View this message in context: http://www.nabble.com/Appfuse2-Spring-MVC-Long-Running-Controller-tf4065660s2369.html#a11552339 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]