We are working on an application in which data needs to be refreshed on a regular basis. Currently the application server is shutdown before the data refresh takes place and started again when data has been refreshed. But the problem is that due to certain reasons the application take a huge amount of time to start up. What we are looking at now is to find out if the web application can be flagged as unavailable for a short duration till the data refresh takes place. Is there some way this can be done. We are using Weblogic 8.1.
The data refresh part is a Java batch job (i.e a standalone program) that reads some xml files and inserts data into a SQL Server database (the database is re-created and the old one is archived or deleted). This batch job need not reside on the same host as the database server or application server. It could be on a seperate host on its own. When the application starts up on Weblogic it reads all the data from the SQL Server database and caches it into memory in suitable java objects. It caches each and every record.
These are the questions that we are facing.
1] How do we notify the application that it should stop servicing any requests from the java batch job (not stopping the app server).
2] How to we suspend the web application for a short duration
3] How do we notify the application that it should start servicing any requests from the java batch job (not restarting the app server).
4] How do we kill all the user sessions that are currently active.
5] How can the cache in memory be updated to reflect the new data.
Its a very complex problem and I dont know if its even possible. Even if I can get answers to a few of the above questions I would appreciate it very much.