Hello,
I need some fresh eyes on this... I am going mad. Here are the two action
methods in the AjaxSessionPing.Action class, including Javadoc comments:
/**
* If there is a session, returns a response with a success (200) code.
If there is
* not a session, returns a response with a failure (300) code so that
the
* ActivePeriodicalUpdater can call the onFailure call back.
*
* @return bare HTTP response with status set
*/
public WOActionResults pingSessionAction() {
ERXResponse response = new ERXResponse();
if (existingSession() != null) {
session();
} else {
response.setStatus(ERXHttpStatusCodes.MULTIPLE_CHOICES); //
CHECKME is that really the appropriate status code?
}
return response;
}
/**
* Same as pingSessionAction, but also checks out session to keep it
alive.
*
* @see #pingSessionAction
* @return bare HTTP response with status set
*/
public WOActionResults pingSessionAndKeepAliveAction() {
if (existingSession() != null) {
session();
}
return pingSessionAction();
}
What is the significant difference between these two methods? If there is an
existing session, calling pingSessionAndKeepAliveAction() ends up calling
session() twice, but other than that... what's the difference? If there's no
existing session, the failure response is returned in either case. Other than
calling session() twice, what's going on here? How are these not essentially
the same method?
--
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]