aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes IDEMPOTENT or not ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "IDEMPOTENT or not ?" Watch "IDEMPOTENT or not ?" New topic
Author

IDEMPOTENT or not ?

hasan khan
Ranch Hand

Joined: Aug 04, 2003
Posts: 222

Can anybody tell me from exam point of view that which of the following methods are IDEMPOTENT or not ?

GET : IDEMPOTENT or not
POST : IDEMPOTENT or not
PUT : IDEMPOTENT or not
HEAD : IDEMPOTENT or not
DELETE : IDEMPOTENT or not
TRACE : IDEMPOTENT or not
OPTIONS : IDEMPOTENT or not
CONNECT : IDEMPOTENT or not


SCJP, SCWCD
Billy Tsai
Ranch Hand

Joined: May 23, 2003
Posts: 1297
idempotent means that the same resulting state change is
made regardless of whether a method is execute 1 time or 100 times.
An idempotent method is one that can be repeated with no negative side effects.


BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
pallavi utukuri
Ranch Hand

Joined: Feb 10, 2004
Posts: 182
The methods GET, HEAD, PUT, DELETE, OPTIONS and TRACE SHOULD NOT have side effects, and so are inherently idempotent.

POST is not idempotent


Thanks,<br />Pallavi
Gaurav Sahni
Ranch Hand

Joined: Sep 03, 2003
Posts: 56
hello CattlePeople,

i have also been pondering over this "Idempotent" stuff from some time. Read some where in previous posts that according to JSP specs, Put and Delete also may have some side effects on repetative execution. So, they are non-idempotent.

It is confusing.Request somebody to clear the mud....

Regards,
Gaurav


To know recursion, you must first know recursion...
pallavi utukuri
Ranch Hand

Joined: Feb 10, 2004
Posts: 182
i came across this....

Idempotent Methods:

Methods may also have the property of "idempotence" in that (aside from error or expiration issues) the side-effects of N > 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property.
Pabak Nanda
Greenhorn

Joined: Nov 04, 2004
Posts: 24
Hello All,

I also found the fact from the servlet specs that doPut and doDelete methods are not idempotent. Please refer page 235 ( for doPut ) and page 230 ( for doDelete).

Hope this helps. If still there is any doubt we can discuss.

Thanks,
Pabak
[ November 07, 2004: Message edited by: Pabak Nanda ]
Gaurav Sahni
Ranch Hand

Joined: Sep 03, 2003
Posts: 56
ok, so let me put it all-together, answering the original question...

GET : IDEMPOTENT
POST : NON-IDEMPOTENT
PUT : NON-IDEMPOTENT
HEAD : IDEMPOTENT
DELETE : NON-IDEMPOTENT
TRACE : IDEMPOTENT
OPTIONS : IDEMPOTENT
CONNECT : IDEMPOTENT

Regards,
Gaurav.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IDEMPOTENT or not ?
 
Similar Threads
Idempotent doubt...
idempotenet or NOT
idempotent
Put - idempotent or not?
Word Power Made Easy