This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to efficiently generate alerts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to efficiently generate alerts" Watch "How to efficiently generate alerts" New topic
Author

How to efficiently generate alerts

Sathish kumar FifthGen
Greenhorn

Joined: Sep 02, 2005
Posts: 3
Hi !

I have a scenario ... There are login for seperate users and if some changes occurs in a DB table (such as row insertion or deletion), a alert must be generated for that particular user ....Anyone suggest me the best way of implementing this scenario ....

Regards
Sathish
Scheepers de Bruin
Ranch Hand

Joined: Jul 19, 2005
Posts: 99
I can think of at least two ways:

a) When the user requests a new page, you display the alert on the page, or the page opens an alert dialog box or window. Users do not like popus, however.

b) Have an 'agent' window opened at the start of the session, that has a timeout set (in javascript) to however often you want to poll the server, and refreshes the agent window at that interval:

<script language="javascript">
setTimeout("document.reload()",1000);
</script>

this script will cause the document to be reloaded in 1 second.


We're doomed!!<br />Yay!!!<br />No that's bad Girr!!<br />Yay!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to efficiently generate alerts
 
Similar Threads
Logical consistency of search results
comparing xml documents.
Why we should prefer synchronization?
VM
Which design should I use?