This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes broadcast a message to all logged in users Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "broadcast a message to all logged in users" Watch "broadcast a message to all logged in users" New topic

broadcast a message to all logged in users

rajesh kumar jhaver

Joined: Sep 04, 2001
Posts: 9
How can I broadcast a message to all logged in users, when my system goes for maintenance. During Maintenance, my Database server will be down and webserver will be up. I am using IIS as webserver, ServletExec as Servlet Engine and JSP.
Thanks in Advance,
Rajesh Jhaver
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
For instance you could do the following:
For any request from your logged users needing a DB query, first of all check if the DB is up.
If not, capture the exception and redirect them to a error/informative page.
Younes Essouabni
Ranch Hand

Joined: Jan 13, 2002
Posts: 479
When your system goes for maintenance, if your servlet context is going down, you may use the ServletContextListener interface.
If I remember well, there is a method: public void ServletContextDestroyed (Servletcontextevent sce), that you may implement.
I think there is a way out there.
I hope it helps

By constantly trying one ends up succeeding. Thus: the more one fails the more one has a chance to succeed.
I agree. Here's the link:
subject: broadcast a message to all logged in users
It's not a secret anymore!