File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Whenever there is a change in the back-end i want a notification in the front-end. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Whenever there is a change in the back-end i want a notification in the front-end." Watch "Whenever there is a change in the back-end i want a notification in the front-end." New topic
Author

Whenever there is a change in the back-end i want a notification in the front-end.

PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212



Whenever there is a change in the back-end i want a notification in the front-end.

Instead of time polling is there any option for the above requirement
Laxmikant Ruikar
Greenhorn

Joined: Nov 29, 2005
Posts: 23
You might looking for such as AJAX Push http://www.icefaces.org/main/ajax-java/ajaxpush.iface
PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
Any option as i don't want to use AJAX.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
There is no reason to fear polling, it can be very fast and has the great advantage of simplicity.

Use the HEAD request and have your application return the last modified date, that way you avoid changing existing GET and POST request handlers.

Bill


Java Resources at www.wbrogden.com
PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
Thanks william and Laxmikant .

william , why did you specify particularly to use Head method ?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
why did you specify particularly to use Head method ?


Interesting point - I have been paying a lot of attention recently to discussions of RESTful design philosophy.

This places a lot of emphasis on using the HTTP methods strictly according to the intent of the HTTP specifiction. HEAD is intended to get "metadata" about a resource, such as the last modified time.

Since the HttpServlet base class already contains doXXX methods for all of the HTTP methods, adding a doHead method to your custom servlet is simple.

Bill
PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
Great point William .Thanks a lot
Mohamed Inayath
Ranch Hand

Joined: Nov 22, 2004
Posts: 124
William Brogden wrote:
why did you specify particularly to use Head method ?


This places a lot of emphasis on using the HTTP methods strictly according to the intent of the HTTP specifiction. HEAD is intended to get "metadata" about a resource, such as the last modified time.

Since the HttpServlet base class already contains doXXX methods for all of the HTTP methods, adding a doHead method to your custom servlet is simple.



Wrt Bill'statement pertaining to HEAD method is correct :
HEAD method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself.
This method is often used for testing hypertext links for validity, accessibility, and recent modification.

But how come it will be useful in finding/knowing that there is change in the backend.

May be I am wrong in understanding, when saying/considering backend as DATABASE resource.
Otherwise whatever William said is right and I go with that.

Please correct me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Whenever there is a change in the back-end i want a notification in the front-end.
 
Similar Threads
Delegate Pattern?!? or memory leak?
what is time to time polling mechanism
Oracle 9i to Excel Sheet
Populating a combobox dinamically from a database
piece of code for auto generation of numbers