M
muttley
hi,
I've hit a peculiar problem trying to solve a requirement in a web app
It requires a batch routine to be fired at a particular time, yet be
controllable via the application.
I solved this by creating a runnable class and a thread to run it,
storing references to both on servletContext, then using standard
jsp/bean code to manipulate it.
starting and stopping the routine using software and command line
service tomcat5 stop / start
works, and the existing thread disappears and reappears when the
website is next logged into.
When there are no users logged in and the application is redeployed by
a war, the context check during login does not find the existing thread
or bean reference so creates a new one (it normally finds the ref and
skips creating one).
1) how would you approach the batch run problem
2) what happens to servletContext when you re-deploy with a war?
any bright ideas welcome
I've hit a peculiar problem trying to solve a requirement in a web app
It requires a batch routine to be fired at a particular time, yet be
controllable via the application.
I solved this by creating a runnable class and a thread to run it,
storing references to both on servletContext, then using standard
jsp/bean code to manipulate it.
starting and stopping the routine using software and command line
service tomcat5 stop / start
works, and the existing thread disappears and reappears when the
website is next logged into.
When there are no users logged in and the application is redeployed by
a war, the context check during login does not find the existing thread
or bean reference so creates a new one (it normally finds the ref and
skips creating one).
1) how would you approach the batch run problem
2) what happens to servletContext when you re-deploy with a war?
any bright ideas welcome