Thanks a lot. I was not aware of how to use servletcontextlistener.
- in contextinitialized I am creating my thread and stopping it in
contextdestroyed.
- I needed a spring bean for thread initialization, which I got in
contextinitialized function.
Juha Laiho wrote:
>
> On 01/09/2011 09:30 PM, Captain Cid wrote:
>> I have moved the thread creation to constructor of a class which is
>> instantiated by spring.
>>
>> Can you elaborate how to spawn thread in it using
>> javax.servlet.ServletContextListener ?
>
> As for ServlerContextListener, please have a look:
> http://www.google.com/search?btnG=1&pws=0&q=servletcontextlistener+example
>
> ... there are of course some other things you might be tripping over,
> but unfortunately you didn't tell where it is you're having problems,
> so you're asking us to do the guesswork.
>
> With the above, you should now have
> - a working ServletContextListener implementation
> - your Spring-initialized class that can create threads
>
> What appears to be missing here is the bridge between the two,
> where a Google search with two very intuitive keywords concerning
> your issue should bring you very close to the solution.
> --
> ..Juha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/Need-to-create-a-new-thread-for-async-operations-tp30625163p30629655.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
|